home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / DOSIMP12.ARJ / SIMPLY7.HYP < prev    next >
Text File  |  1992-01-16  |  112KB  |  1,976 lines

  1.                             The |TAPPEND|T Command
  2.  
  3. This command  is a TSR  that works just like the  PATH command,  only for
  4. data files  instead  of executable files.   If your current directory  is
  5. C:\WORD  and you want to do something  with the file  C:\WORD\LETTER.DOC,
  6. that's easy.  You just say LETTER.DOC.  But if C:\WORD is not the current
  7. directory,  then you have to say \WORD\LETTER.DOC in order to access that
  8. file.   Well this is  no longer the case,  ever since the  |nAPPEND|n command
  9. came on the scene  in DOS version 3.2.   If you had previously issued the
  10. command  |nAPPEND|n C:\WORD then you can just say LETTER.DOC,  no matter what
  11. your current directory is, and DOS will be able to find the file.
  12.  
  13. There is a big problem with this, though.   DOS can use the |nAPPEND|n method
  14. to find the file, but it can't use it to write the file back to disk.  So
  15. if any changes  are made to the file  after it has been found via the AP-
  16. PEND method,  the new copy of the file  will be written  into the current
  17. directory.   The original copy of the file  is still right  where it was,
  18. only without today's changes.   Now if you make some more changes  to the
  19. file tomorrow, and you had started from some other directory, then by the
  20.                        <page down> for more APPEND
  21. end of tomorrow  you'll have three copies of your LETTER.DOC file sitting
  22. on your disk,  but all three of them are incomplete.   You still have the
  23. original copy in the C:\WORD directory, but it is missing yesterday's and
  24. today's changes.  Then you have the copy that was created yesterday, that
  25. has yesterday's changes  but not  today's changes.   And finally you have
  26. today's copy, which is the original with today's changes, but not yester-
  27. day's changes.   Three copies of the same file, in three different direc-
  28. tories,  and all of them are wrong.   So what's so great about the |nAPPEND|n
  29. command?
  30.  
  31. Well it does have its uses, but you just have to think for a minute about
  32. what you're doing, before you use it.  First, you'll need to find out for
  33. sure which files on your disk ever get modified.  See, you're not the on-
  34. ly one who ever modifies your files.   Your programs do some modifying of
  35. their own files from time to time.  So to find out, do a complete BACKUP,
  36. which turns off the Archive attributes for all your files,  then use your
  37. computer normally for a couple weeks, and then do this:
  38.           ATTRIB \*.* /S || FIND " A " > PRN
  39. That will send,  to your printer,  a list of every file  on the disk that
  40.                        <page down> for more APPEND
  41. has been modified since the BACKUP.  Make sure to leave a <Space> on each
  42. side of the capital A inside the quotes, or it won't work.
  43.  
  44. You never want to put the directories that contain these changeable files
  45. on your |nAPPEND|n command line.   But you can use it  for any directory that
  46. doesn't contain changing files.   Suppose you keep all your word procces-
  47. sor's program files in your C:\WORD directory,  and you keep all the doc-
  48. uments that you create with your word processor, in a subdirectory called
  49. C:\WORD\DOCS.  Suppose also that none of the files in your C:\WORD direc-
  50. tory came up on that list of changeable files.   Then you can put the C:\
  51. WORD directory on your PATH,  and also on your |nAPPEND|n line.   And you can
  52. change to your  C:\WORD\DOCS  directory  (with the CHDIR command)  before
  53. each time  you start your  word processor.   This way,  all the files you
  54. might change  with the word processor  are in the  current directory,  so
  55. they'll get written  back to the proper place,  but you can  still access
  56. the word processor's  executable files  (via the |sPATH|s)  and it can access
  57. its |soverlay|ss (via the |nAPPEND|n line), and everybody will be happy.
  58.  
  59. The syntax for this command is exactly like that for the PATH command.
  60.                     <page down> for The |nASSIGN|n Command
  61.                             The |TASSIGN|T Command
  62.  
  63. Here's a command you won't be using too often.   It is a TSR that is used
  64. to change all references to one drive, to another drive.   This is useful
  65. for installing  programs  that insist on being  installed from  a disk in
  66. drive A:.   Well,  what if you got the software  on 3.5" disks,  and your
  67. 3.5" drive is drive B:?    Here's where the |nASSIGN|n command comes in.   If
  68. you were to issue the command |nASSIGN|n A=B then every time the installation
  69. program requests a read from drive A:, DOS will send the program to drive
  70. B: instead and you will probably be able to install with no problem.
  71.  
  72. This command is not all roses, though.   It can be very dangerous!  Don't
  73. use it  unless you have a complete BACKUP  of your hard drive  as well as
  74. any floppies  you may  be using  while the  |nASSIGN|n command  is in effect.
  75. Then,  disable the assignment  just the second  you're done with whatever
  76. you were  doing  that required the  assignment.   To do that,  just enter
  77. |nASSIGN|n with no parameters.
  78.  
  79. That really is not just hot air.   Don't leave  an assignment active  for
  80.                        <page down> for more ASSIGN
  81. one single minute longer than you have to.   All sorts of terrible things
  82. can happen.   Some DOS commands or programs might  ignore the assignment,
  83. and perform the  specified command on the A: disk  when you meant for the
  84. command to happen to the B: drive.  On the other hand, if you forget that
  85. you have an assignment made,  and perform some command that  does not ig-
  86. nore the assignment,  you'll end up  once again having that command  per-
  87. formed on the wrong disk.   For example,  what if, after you've given the
  88. command |nASSIGN|n A=C, then you forget that you've done that, and put a disk
  89. into drive A: and enter DEL A:*.*?  Know what's going to happen?  All the
  90. files in the current directory of drive C: will be deleted.
  91.  
  92. And any TSR  that is resident  while an |nASSIGN|n is active, including DOS's
  93. PRINT command, can do some serious damage to your data.   And if you goof
  94. up and use DOS's BACKUP command  on an assigned drive,  it might act like
  95. it's working,  but when you go to RESTORE the backup disks,  you may find
  96. that your backup disks are worthless.
  97.  
  98. If for any reason you find  that you need to use  the |nASSIGN|n command on a
  99. regular basis to make one particular application work with your setup, do
  100.                        <page down> for more ASSIGN
  101. it from a batch file.   Have the batch file make the assignment, then run
  102. the app,  and then undo the assignment.   That way you'll never forget to
  103. unassign, because the batch file always remembers for you.
  104.  
  105. If you  already have  one assignment made,  and you issue  another |nASSIGN|n
  106. command to make another assignment,  the second one will cancel the first
  107. one.  But you can make two assignments with one |nASSIGN|n command, so that's
  108. ok.   Just do something like  |nASSIGN|n A=C B=C.   You can even  reverse two
  109. drives with |nASSIGN|n A=B B=A.
  110.  
  111. Notice that this command  is one of the only times where you are supposed
  112. to reference  a drive letter  without using  a colon (:).   |nASSIGN|n A=B is
  113. correct, but |nASSIGN|n A:=B: is not.  (Well, in DOS version 5 it is ok.)
  114.  
  115. If you have  DOS version 3.1 or later,  use the SUBST command  instead of
  116. |nASSIGN|n.   It's not the safest command in the world either,  but it's sure
  117. safer than |nASSIGN|n!   If you have the SUBST command you should just delete
  118. the |nASSIGN|n.COM file from your hard drive, so you don't forget and use it.
  119.  
  120.                        <page down> for more ASSIGN
  121. DOS version 5 adds the /STATUS switch to this command.   If you enter the
  122. command  |nASSIGN|n /STATUS  then DOS will tell you  what assignments  you've
  123. made, that are still active.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.           <page down> for The |nATTRIB|n Command and File |nAttributes|n
  141.                   The |TATTRIB|T Command and File |tAttributes|t
  142.  
  143. The syntax for this command is as follows:
  144.           |nATTRIB|n +a FILENAME.EXT
  145. where "a" can be the initial  of any one of the four file |nattributes|n, and
  146. the + is for turning the attribute on.   To turn one off,  use - instead.
  147. But DOS versions previous to 5 can only work with the R and A |nattributes|n.
  148. If you need to alter an H or S attribute and you have an older version of
  149. DOS,  there are many utilities that can do it,  such as PC Tools, Norton,
  150. and several public domain  or freeware ones such as HIDE.COM from PC Mag-
  151. azine.
  152.  
  153. A very  little-known use  for the |nATTRIB|n command,  is to search your hard
  154. drive for a file.   If you use  the |nATTRIB|n command  without any +a or -a,
  155. it will  just show you the names  of the specified files,  with their at-
  156. tributes displayed  next to each.   An extra benefit  of this is that the
  157. file's entire |spath|sname is included!   So now you know  in which directory
  158. that file resides!  For example, suppose you have a file named ABCDEF.EXE
  159. and you can't remember where it is.  Go to the root directory and use the
  160.                 <page down> for more ATTRIB and Attributes
  161. command  |nATTRIB|n ABCDEF.EXE /S  and the /S tells |nATTRIB|n to search not only
  162. the current directory, but also every subdirectory below the current one,
  163. so if you start from the root, the whole drive will be searched.  The re-
  164. sult may be this:
  165.           A R  C:\DOS\ABCDEF.EXE
  166. Now you see that the file is in the \DOS directory.  (And that it has its
  167. Archive and Read-only |nattributes|n turned on.)
  168.  
  169. The |nATTRIB|n command also  fully supports wildcards.   For example, you can
  170. set the R attribute  of every .EXE file on the drive with the command AT-
  171. TRIB +R *.EXE /S, if you do it from the root directory.   Or, if you want
  172. to find every .BAT file you have on the drive, |nATTRIB|n \*.BAT /S will show
  173. you their full file specifications, even if you're not in the root direc-
  174. tory because the backslash (\) tells DOS to start the search in the root.
  175.  
  176. In DOS version 5,  this command works on H  and S |nattributes|n as well as A
  177. and R ones.   But you can't  do anything  with a file that has H and/or S
  178. until  those two |nattributes|n are gone.   If you have a file  with all four
  179. |nattributes|n,  and you want to remove the A,  for example,  you can't do it
  180.                 <page down> for more ATTRIB and Attributes
  181. while the file has H and S,  so |nATTRIB|n -H -S -A FILE.EXT will do it.   If
  182. you wanted that file to keep its H and S,  then put them back with |nATTRIB|n
  183. +H +S FILE.EXT.   Yes, it is ok to change more than  one attribute on one
  184. command line like that.
  185.  
  186. A file can have any of four |nattributes|n.  The |nattributes|n for each file are
  187. stored in the directory.  The possible |nattributes|n are |nHidden|n, System, Ar-
  188. chive,  and Read-only.   (The word "attributes"  can also refer to screen
  189. colors, but that has nothing to do with this meaning of the word.)
  190.  
  191. |tHidden|t files can be executed, but they cannot be deleted,  updated,  cop-
  192. ied,  or even seen  in a directory listing.   Many programs give a |nHidden|n
  193. attribute to their most important files, on the assumption that since you
  194. can't see them in a directory listing,  you won't know they're there, and
  195. you won't try to mess with them.   DOS has two |nHidden|n files named  IO.SYS
  196. and MSDOS.SYS for MS-DOS, or IBMBIO.COM and IBMDOS.COM for PC-DOS.
  197.  
  198. The System attribute is quite similar to the |nHidden|n one.
  199.  
  200.                 <page down> for more ATTRIB and Attributes
  201. The |tArchive|t attribute is turned on  every time a file is created,  copied
  202. into a directory,  or updated in any way  via normal  DOS function calls.
  203. The main purpose of this is so that a BACKUP program can tell which files
  204. need to be backed up (archived).   Most backup programs  turn the |nArchive|n
  205. attribute off each time they backup a file,  so the program knows that if
  206. the  |nArchive|n attribute  is on,  the file has been changed  since the last
  207. backup was done and needs to be backed up (archived) again.
  208.  
  209. Most people think that there's no reason to mess with |nArchive|n |nattributes|n,
  210. but that's just plain silly.  If you backup your drive often, which turns
  211. off all the |nArchive|n |nattributes|n,  then you can tell a lot  about what goes
  212. on by looking  to see which files have had their A |nattributes|n turned back
  213. on.  You can tell which programs change which files.  You can tell wheth-
  214. er it's time  to do a new backup.   You can tell whether  shelling out to
  215. DOS has netted you  any stray temp files,  more easily than if you had to
  216. just search the whole disk for them,  because any temp files  will defin-
  217. itely have A |nattributes|n.  (Unless you backed them up, which you certainly
  218. didn't want to do!)   All sorts of things.   And there are  lots of times
  219. when you  want to remove  an A attribute from a file.   If you'll notice,
  220.                 <page down> for more ATTRIB and Attributes
  221. this book's *.INX files are always getting  their A |nattributes|n turned on.
  222. That's because of the method the HLPURSLF program uses to work with those
  223. files.   DOS just thinks  that an important change  has been made,  so it
  224. turns on the A attribute.   But you have absolutely no need to go backing
  225. up the .INX files all the time.  So you want to remove their A |nattributes|n
  226. before each time  you backup,  so that the BACKUP command  doesn't try to
  227. back them up.   There are lots of  files that get  modified  in some way,
  228. that don't need to be  backed up.   Like the CPSC.TRE file  that PC Tools
  229. version 7's  PCShell uses.   It's just  a copy  of your disk's  directory
  230. structure, that PCShell uses to do its work a little faster.  It wouldn't
  231. make a bit of sense to backup that file.  So turn off its A attribute be-
  232. fore you backup so it won't get backed up.  (Of course, this only applies
  233. to incremental backups, because those are the ones that use the A attrib-
  234. ute.   A full backup backs up everything with or without an A attribute.)
  235. See the last part  of the APPEND chapter  for a little  more  information
  236. about Archive |nattributes|n, and also the XCOPY chapter.
  237.  
  238. A file  which has its Read-only attribute set  can be executed, read, re-
  239. named, or copied, but can't be deleted or updated.  Setting the R attrib-
  240.                 <page down> for more ATTRIB and Attributes
  241. ute is a good way  to save your files  from accidental deletion.   If you
  242. try to delete a file that has an R attribute, you'll get "|tAccess denied|t".
  243. (See also the end of the Directory chapter.)
  244.  
  245. However,  some programs will search for certain companion files that they
  246. need in order to run,  and if the companion file  has its R attribute set
  247. to on, the program might think the file is missing.  So if you ever run a
  248. program which says, "I cannot find my |toverlay|t file named ABCDEF.OVL, I am
  249. aborting myself", even though you can see that the file is in the current
  250. directory,  just turn the R attribute for that file off,  and the program
  251. should run just fine.
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.                     <page down> for The |nBACKUP|n Command
  261.                             The |TBACKUP|T Command
  262.  
  263. How important is it to backup your hard disk?   Well,  how hard is it for
  264. you to get your files all organized  the way you want them?   How hard is
  265. it for you to create your data files in your word processor, spreadsheet,
  266. database,  or whatever other type  of programs  you use?   Do you want to
  267. take the very real chance that it could all be lost,  and you'll be right
  268. back to square one, when there's something you can do to prevent it?   Of
  269. course backing up is a pain!   Most worthwhile things are.   But once you
  270. have done it a couple times,  it won't be confusing anymore.   You'll get
  271. the hang of it in no time flat.   Make it a habit, and just like all hab-
  272. its, it will become second nature.
  273.  
  274. Some people think that backing up program files is pointless,  since they
  275. still have  the original installation floppies  that the program came on.
  276. They think it would  be easier  to reinstall later,  if need be,  so they
  277. only backup  the data files  that they create.   But floppy disks tend to
  278. lose their data over time.  Magnetic particles lose their magnetism.  You
  279. might think you have  your original installation floppies,  but two years
  280.                        <page down> for more BACKUP
  281. from now when your hard drive crashes  and it's time to reinstall,  those
  282. floppy disks might be just about blank.  Besides, what about all the con-
  283. figuration you did,  to get that program all set up just the way you like
  284. it?   Wouldn't it be easier to just back that up one time, as soon as you
  285. get it configured to your taste,  than it would be to reinstall two years
  286. from now  and try to remember  exactly how you had it configured?   So go
  287. ahead and back it up once every year or so,  even if you don't include it
  288. in your monthly backup set.
  289.  
  290. You have to be  really careful to stick a label onto each disk  as you're
  291. doing the backup,  because the RESTORE command,  which is the only way to
  292. read backup disks, has to have the disks in the right order to be able to
  293. put your files back together later after your hard drive has crashed.  Be
  294. really sure that you know the correct order of the backup disks.  Include
  295. the date and time on the labels too!
  296.  
  297. I keep saying "after your hard drive has crashed".  Are you thinking that
  298. I should be including the word "if" in there somewhere?   Wrong.  There's
  299. no "if" about it.   Your hard drive is going to crash.   Some people have
  300.                        <page down> for more BACKUP
  301. weekly crashes,  because they don't know what they're doing.   Other hard
  302. drive crashes are purely mechanical failure  and are so bad that it means
  303. hard drive replacement.   But whichever kind of crash it is,  it is going
  304. to happen  to you  eventually!   And if you have  a nice recent  complete
  305. backup, it's not a problem (except paying for the new hard drive).
  306.  
  307. Not too many people use the DOS |nBACKUP|n command, but it's fine for a while
  308. 'til you get something better.  The syntax is COMMAND SOURCE TARGET SWIT-
  309. CHES just like most any other DOS command.  So let's take those parts one
  310. at a time.  The command is |nBACKUP|n, or C:\DOS\BACKUP, or A:\BACKUP, depen-
  311. ding on where the executable file is located.
  312.  
  313. The source is  what files you want to backup.   If you want to backup the
  314. whole disk,  you must perform this command from the root directory of the
  315. disk,  and the source would then be C:\*.*, which means everything in the
  316. root directory.   Later we'll get to  the part of the command  that tells
  317. DOS to also include the subdirectories of the root directory.
  318.  
  319. Now the target is where you want the backup files to end up.  That's just
  320.                        <page down> for more BACKUP
  321. a drive letter, like A: or B:.
  322.  
  323. Now for the harder part.   Don't worry,  it's not that hard.   The |nBACKUP|n
  324. command has quite a few switches from which to choose.  Here they are:
  325.           /S  /M  /A  /D:05-16-91  /T:10.02  /F  /L:C:FILENAME.EXT
  326. So,  what on earth  do all those things  do?   Well the /S switch  is for
  327. subdirectories.   That's what tells DOS to backup not only the current or
  328. specified directory,  but also all of  the subdirectories  anywhere under
  329. that directory.
  330.  
  331. The /M switch checks  the Archive attributes for all the files,  and only
  332. backs up files that have been created  or modified since  the last backup
  333. was done.   You don't want to use this switch  the first time you backup,
  334. but only for incremental backups.  (Incremental means just the files that
  335. have changed since the last time.)
  336.  
  337. The /A switch  tells DOS not to  erase the files  that are already on the
  338. target disk,  the way it usually happens,  but to leave  them there,  and
  339. just add the files now being backed up,  to the space that is left on the
  340.                        <page down> for more BACKUP
  341. disk from the previous backup.   So obviously this switch is only for in-
  342. cremental backups also.   If your last incremental backup took 5.2 disks,
  343. then you still have 80% of that last disk empty.  Well the /A switch will
  344. allow you  to fill up  the empty space on that disk  for this incremental
  345. backup, instead of making you start fresh on a new disk.
  346.  
  347. The /D:05-16-91 switch tells DOS to only backup files that were last mod-
  348. ified on or after that date.   You don't want to use that switch with the
  349. /M switch because they'd both be trying to do the same thing in different
  350. ways.  In fact, I'd never trust this switch, in case the system clock had
  351. been wrong at some point.  Because then you'd end up backing up the wrong
  352. files all together!  The /T:10.02 switch which didn't appear in DOS until
  353. version 3.3, allows you to be even more specific, about the time.  It can
  354. tell DOS to only backup files modified at or after that time of day.   Do
  355. not forget to convert times to military format though, because if you en-
  356. ter 3.00 then you're going to get 3 am.  If you want to say 3 pm then use
  357. 15.00.  Don't even think about using the /T switch without using /D also.
  358.  
  359. The /F switch  tells DOS to FORMAT  the disks before backing up  files to
  360.                        <page down> for more BACKUP
  361. them, if they haven't already been formatted.  If the FORMAT command file
  362. is located in a directory listed in the PATH variable in the environment,
  363. then the |nBACKUP|n command can format the disks while it's backing up.  This
  364. switch didn't exist until DOS version 3.3, so before that, we had to for-
  365. mat a whole stack of disks before we even started backing up.   Then what
  366. would happen, is that we hadn't formatted enough disks,  and we would run
  367. out, and do you know what that used to mean to the backup process?   That
  368. would mean we would have to start over completely  from the beginning af-
  369. ter we went  and formatted some more disks.   Because there isn't any way
  370. to tell the |nBACKUP|n command to pick up where we left off before we ran out
  371. of formatted disks.  Oh yes, the /F switch was welcomed by all DOS users!
  372.  
  373. Ok,  last one,  the /L switch.   This one also didn't exist until version
  374. 3.3 of DOS.   What it does  is it creates a log file  of what the  |nBACKUP|n
  375. command did.   That way,  after you've backed up  your whole disk and you
  376. have a stack of 38  floppy disks,  you can tell which files  are on which
  377. floppies.  Because the |nBACKUP|n command concatenates all the files into one
  378. big file, which fills up the whole disk,  so you can't tell from the dir-
  379. ectory listing  which files  are where!   If you  leave out  the path and
  380.                        <page down> for more BACKUP
  381. filename info in the /L switch, |nBACKUP|n will automatically use the default
  382. name of |nBACKUP|n.LOG and put it in the root directory of the source disk.
  383.  
  384. In my opinion, the worst thing about the DOS |nBACKUP|n command is that there
  385. are only two ways to do it.   You can do a full backup which backs up the
  386. whole drive, and each time after that you can do an incremental backup of
  387. just the files that have changed since the last time you backed up.
  388.  
  389. Know what that means?   That means that when it comes time to RESTORE the
  390. files to the hard drive, you need to have that original full backup's set
  391. of floppy disks,  and you also need the disks from each and every increm-
  392. ental backup  you've done  since then.   If you're backing up twice every
  393. week like you should be, then after a year you've got over a hundred sets
  394. of backup floppies.
  395.  
  396. True, each set after the first one, might have been only one or two disks
  397. but still, that's a tremendous amount of disks to mess with!  You have to
  398. keep them all safe  and secure until such time as you do another complete
  399. backup.   After that time,  but not until then, you can re-use all of the
  400.                        <page down> for more BACKUP
  401. disks from the full backup and the incremental backups.  What a pain!
  402.  
  403. Some commercial backup programs have another choice in backup strategies,
  404. though, and PC Tools, for example, calls it Differential backup.  Here is
  405. what it does:
  406.  
  407. The first full backup you do  backs up every file you have,  right?   And
  408. it also turns off  the Archive attributes for all the files it backed up.
  409. Now you've probably  only got  a few dozen files  that are ever  going to
  410. change,  if you don't go out and buy any more software.   All these files
  411. that are ever going to change will probably fit on one or two disks.
  412.  
  413. Well the Differential backup method  backs up all the files that have the
  414. Archive attribute set,  but it doesn't turn it back off!   That way,  the
  415. next time you do  a Differential backup,  it backs up everything that has
  416. changed  since the original  full backup!   That means  you don't have to
  417. keep every single set of Differential backup disks you've made!
  418.  
  419. So, on week one you do a full backup.   On week two you do a Differential
  420.                        <page down> for more BACKUP
  421. backup.   On week three you do another Differential backup.   Now on week
  422. four you can re-use  the disks that you used  for week two's backup,  and
  423. on week five you can re-use  the week three backup disks!   You only need
  424. to keep your original full backup disks,  and the two most recent sets of
  425. Differentials!   (The reason you want to keep last week's set  as well as
  426. this week's set  is not because  there are any files  on last week's that
  427. aren't on this week's,  but only because  in case you've made  a big goof
  428. in data entry  this week,  you can RESTORE  last week's copy of the file,
  429. from before you made the big goof.)
  430.  
  431. So that's just one of the reasons  you want to get some other backup pro-
  432. gram besides  the DOS |nBACKUP|n command,  so you can do Differential backups
  433. instead of just incremental ones.  Other reasons?  Most people think that
  434. the DOS |nBACKUP|n and RESTORE commands are not reliable.  That may have been
  435. true back in DOS version 2, but not anymore.  They work perfectly well as
  436. long as you get the syntax right.  That's the hard part, for most people.
  437. They use the wrong command  and then they think it's |sRESTORE|s's fault that
  438. they can't get their files back.   But it is true  that DOS's  |nBACKUP|n and
  439. RESTORE commands  are not exactly  friendly.   There are a lot of  third-
  440.                        <page down> for more BACKUP
  441. party programs that let you use menus  to tell them exactly what you want
  442. them to do.  You can pick exactly which files you want backed up, etc.
  443.  
  444. One thing you really want to do  whenever you're about to  use the |nBACKUP|n
  445. or RESTORE commands,  is to reboot the computer  without loading any |sTSR|ss
  446. into memory,  because they can seriously interfere with  the operation of
  447. these two commands.   That goes for the DOS commands, or any other backup
  448. program.   And in most cases, you can only restore a backup using the RE-
  449. STORE command from the same version of DOS that made the backup.
  450.  
  451. To get  an estimate  of how many disks  it will take  for a complete hard
  452. drive backup, just do a CHKDSK command,  and subtract "|sbytes|s available on
  453. disk" from "|sbytes|s total disk space",  divide by the capacity of the disks
  454. you'll be using, and add two or three disks for good measure.   You don't
  455. have to worry about "|sslack space|s" the way you usually do on floppy disks,
  456. because the |nBACKUP|n command  puts all the data  from all your files,  into
  457. one great big file,  and fills up every single byte of disk space on each
  458. floppy.   So the only extra space that's needed, is for the control files
  459. that tell RESTORE what files are on each disk.
  460.                        <page down> for more BACKUP
  461. One thing that |nBACKUP|n can do,  that almost nothing else can do, is trans-
  462. fer a file that's larger than the floppy disk size you're transferring it
  463. to.  |nBACKUP|n can split a file up across however many floppy disks it takes
  464. and RESTORE can  put the pieces back together  into a file again.   There
  465. are also a few |sshareware|s/|spublic domain|s programs  that can do it,  such as
  466. SLICE.   Or,  you can use  a compression program like PKZIP,  to make the
  467. file small enough to fit onto one disk.   But |nBACKUP|n and RESTORE are pro-
  468. grams that you already have, so why not use them instead?
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.      <page down> for The BASIC, BASICA, |nGWBASIC|n, and |nQBASIC|n Commands
  481.              The BASIC, BASICA, |TGWBASIC|T, and |TQBASIC|T Commands
  482.  
  483. These are the commands  which run the BASIC interpreter.   What does that
  484. mean?   Well BASIC is a very simple  (compared to most) programming lang-
  485. uage.   Now the version of BASIC  that comes with DOS  does not include a
  486. compiler.   A compiler is what turns some programmer's source code into a
  487. .COM or .EXE file.   This BASIC doesn't make .COM or .EXE files;  it only
  488. makes  .BAS files,  and those are not executable.   So you need the BASIC
  489. interpreter  to tell the computer  what your source code  (the .BAS file)
  490. means.   Because the computer  can't understand BASIC  without the inter-
  491. preter, until it's been compiled (converted to a .COM or .EXE file).   If
  492. you want to write  in BASIC and be able  to compile it,  there are  a few
  493. public domain and shareware compilers,  but you're better off to buy Mic-
  494. rosoft's QuickBASIC program.  It's really worth it.
  495.  
  496. Now  I'm just going to assume  that the version  you have  is |nGWBASIC|n.EXE
  497. since  that's the one  that comes with  MS-DOS versions  previous to 5.0,
  498. which is what most people have.   If you have BASIC or BASICA,  just sub-
  499. stitute that for every place I say |nGWBASIC|n.
  500.                        <page down> for more GWBASIC
  501. To run a program whose filename ends in .BAS,  you just type |nGWBASIC|n fol-
  502. lowed by the first name of that program file.  For example, if you have a
  503. file named MUSIC.BAS that you would like to run,  you type |nGWBASIC|n MUSIC.
  504. And the BASIC interpreter will load into your computer's memory, and load
  505. that MUSIC.BAS file from your disk into memory also, and then execute the
  506. instructions that are inside the MUSIC.BAS file.  Of course, if the MUSIC
  507. .BAS file is not in  the current directory of your current drive,  you'll
  508. have to tell BASIC where to find it, as in |nGWBASIC|n C:\GW\MUSIC.
  509.  
  510. If you have IBM-DOS version 4 or earlier, then you have BASICA instead of
  511. GW-BASIC.   It's just the same thing, except for one difference.  The BA-
  512. SICA command won't run on a non-IBM computer,  because IBM computers have
  513. a part of the BASIC code stored in ROM, and the BASICA command depends on
  514. that code for its operation.   If you try to run this command on a compu-
  515. ter that isn't a true-blue IBM, the code will just sit there all day long
  516. looking for that piece of ROM  that has the rest of the BASIC code in it,
  517. and you can't  do a thing about it  except reboot.   So that's why people
  518. with clones  (computers that are compatible with IBM but are not manufac-
  519. tured by IBM)  are not supposed to be using PC-DOS.   Because PC-DOS does
  520.                        <page down> for more GWBASIC
  521. not have a |nGWBASIC|n command,  and the BASICA command won't run on a clone.
  522.  
  523. If you run |nGWBASIC|n  without a filename,  it will just load  and sit there
  524. showing you its |nprompt|n, and waiting for you to tell it what to do.   (The
  525. BASIC |nprompt|n is just _, an underline,  which is usually preceded by an OK
  526. message.)   If you want to get back to DOS  just type SYSTEM  and hit the
  527. <Enter> key.   Otherwise,  go get yourself a nice BASIC book and check it
  528. out.  It really is a lot easier than other programming languages.
  529.  
  530. The name  BASIC,  by the way,  stands for Beginners' All-purpose Symbolic
  531. Instruction Code.
  532.  
  533. If you have a special proprietary version of MS-DOS, like from the Kaypro
  534. company  or the COMPAQ company  or the Zenith company,  you might  have a
  535. command named  BASIC instead of  |nGWBASIC|n.   But it's just the same thing,
  536. only optimized to run best on your specific brand of computer.
  537.  
  538. If you have DOS version 5,  you have the |nQBASIC|n command instead of BASICA
  539. or |nGWBASIC|n.  It's a very greatly improved version!   But for the earliest
  540.                        <page down> for more GWBASIC
  541. release of IBM-DOS 5, the same rules apply, about trying to run |nQBASIC|n on
  542. a non-IBM computer.  It won't work.  But about two months after the init-
  543. ial release,  IBM finally,  after all these years,  released a fixed ver-
  544. sion that allows |nQBASIC|n  (and therefore,  |sEDIT|s)  to work on clones,  just
  545. like MS-DOS has always been able to do!
  546.  
  547. To run a |nQBASIC|n program  straight from the command line,  you type a com-
  548. mand like this:  |nQBASIC|n /RUN C:\DOS\PROGRAM.BAS.  If the last instruction
  549. in the PROGRAM.BAS file is SYSTEM, then when the program is done, it will
  550. return to DOS  instead of just  sitting there  in the |nQBASIC|n  environment
  551. waiting for you to type SYSTEM.
  552.  
  553. If you have some old BASIC programs from a previous DOS version, the REM-
  554. LINE.BAS  program that comes with DOS 5.0  will help you  convert them to
  555. the format that |nQBASIC|n uses.   But first you have to use your old version
  556. of the  BASIC interpreter  to save the program  in plain ASCII format in-
  557. stead of the compressed BASIC format.
  558.  
  559.  
  560.                     <page down> for The |nCHKDSK|n Command
  561.                             The |TCHKDSK|T Command
  562.  
  563. This is  a very useful command  that performs  many different  functions.
  564. The main thing  it is supposed to do  is CHecK the directory structure of
  565. your DiSK.   There are lots  of things  that can go wrong  when the read/
  566. write heads are  writing to a disk.   Any sort  of disturbance  can cause
  567. the heads to not write  what they were supposed to write,  and |nCHKDSK|n can
  568. find  what problems  may have been caused,  and can also correct  some of
  569. them.
  570.  
  571. However, |nCHKDSK|n will only make corrections if the /F switch was specified
  572. on the command line.   If the /F switch  was not given,  and |nCHKDSK|n finds
  573. any errors, it will say something like,  "F parameter not specified, cor-
  574. rections will not be written to disk".   |nCHKDSK|n will continue to act like
  575. it is making corrections,  however,  just to show you what corrections it
  576. would have made if the /F switch had been specified.   So if you like the
  577. corrections,  you can re-run the |nCHKDSK|n command with the /F switch and it
  578. will actually write the corrections to the disk.   Do not ever use the /F
  579. switch while any |sTSR|ss are in memory!
  580.                        <page down> for more CHKDSK
  581. The most common error that |nCHKDSK|n  finds is something like "4 lost chains
  582. in 6 |scluster|ss".   What that means is that  there is some data on the disk
  583. that has space allocated to it in the FAT, but that has no entries in the
  584. directory.   If you specify the /F switch, |nCHKDSK|n will convert those lost
  585. chains to files,  and give the files names like FILE0000.CHK and put them
  586. into the root directory of the disk.  Now what do you do with them?
  587.  
  588. Well, first look at them  with the TYPE command  or some other file brow-
  589. ser.   If they are nothing but strange symbols,  then they must have been
  590. .COM or .EXE files, and there is no way you can recover them.  Because it
  591. is highly unlikely that the files are complete,  and who knows what might
  592. happen if you try to run a command file that is not complete.   Just del-
  593. ete those files.
  594.  
  595. If there is some  recognizable text inside though,  you should be able to
  596. tell  what application  the lost chain was from.   Just load it into that
  597. application,  and do your best to put the file back to the way it used to
  598. be.  It's usually better than losing the whole file.
  599.  
  600.                        <page down> for more CHKDSK
  601. Most often,  though,  these FILE0000.CHK files  that |nCHKDSK|n makes are not
  602. anything  important at all.   They're usually  pieces of temp files  that
  603. some application was using,  which would have been deleted by that app if
  604. the app had been  properly exited,  but maybe your machine  locked up and
  605. you had  to reboot,  so the app  didn't get a chance  to delete  its temp
  606. files.   Well if it happened at a moment when the app had temp file space
  607. allocated in the FAT,  but it didn't have the temp file's directory entry
  608. updated,  then the temp files will end up as lost chains.   Deleting them
  609. is no problem  because once the app lost its place  in the temp file,  it
  610. can't figure out what to do with it anyway,  even if it was something im-
  611. portant.
  612.  
  613. Well as long as  these lost |scluster|ss  are sitting  on your disk,  they're
  614. just taking up disk space  for no reason.   So you want to run the |nCHKDSK|n
  615. command  every week or so,  to free up  any space that might be in use by
  616. these silly things.
  617.  
  618. Another error message that |nCHKDSK|n comes up with pretty often is "FILE1 is
  619. cross-linked on cluster ##,  FILE2 is cross-linked on cluster ##".   This
  620.                        <page down> for more CHKDSK
  621. means that both FILE1's  and FILE2's  FAT entries say  that the two files
  622. are using the same cluster of disk space.   This is a FAT error that CHK-
  623. DSK can't do anything about.   You have to try  to fix it yourself.   You
  624. must not ever try to run  an executable file  that has been cross-linked!
  625. Just  delete it.   But if one  or both  of the files  are non-executable,
  626. there is hope for recovery.   Just COPY the files  to a different disk or
  627. directory and delete them both from the original location.   Now load the
  628. files  into whatever application created them  and see how much  data you
  629. can save.   One of the files will contain  a cluster from the other file,
  630. and also one  or both of them  may have been truncated  (cut off)  at the
  631. point where the cross-linkage had occurred.   But it's better than losing
  632. both files altogether.  Of course if they were both executable files then
  633. it's a total loss.  That's what |sBACKUP|ss are for.
  634.  
  635. So, what else is the |nCHKDSK|n command good for?   Well, it gives you a real
  636. nice summary of what's on your disk,  as well as how much free memory you
  637. have.   It can also give you a list of every file on the disk, if you use
  638. the /V (verbose) switch.  And that will include all the Hidden files too.
  639. If you pipe the output of |nCHKDSK|n /V to the FIND command, you can find the
  640.                        <page down> for more CHKDSK
  641. location of any file on your disk:
  642.           |nCHKDSK|n C:\*.* /V || FIND ".BAT"
  643. would show you  the full filespec  for every .BAT file on the disk.   But
  644. remember,  the FIND command is case-sensitive,  and filenames  are always
  645. stored in all caps, so FIND ".bat" would not work at all.
  646.  
  647. Another thing the |nCHKDSK|n command can do  is tell you whether you have any
  648. |tfragmented|t files.  What does that mean?  Well, DOS stores files on a disk
  649. a cluster at a time.  A cluster, depending on the version of DOS the disk
  650. was formatted with,  and also the size of the disk,  can be anywhere from
  651. 512 to 16384 bytes.   Most hard disks have 2048-byte |scluster|ss.  Well when
  652. DOS is writing a file to disk,  it puts down one |scluster|s's worth  of data
  653. into the  first available cluster  on the disk,  then it puts  the second
  654. cluster of the file  into the second available cluster on the disk,  then
  655. it puts the third cluster of the file into the third available cluster on
  656. the disk, etc.   These |scluster|ss aren't necessarily  next to each other on
  657. the disk,  and if they're not,  then the file  is said to be  |nfragmented|n.
  658. Your hard drive  will appear to work faster  if all the pieces  of a file
  659. are right next to each other, or in contiguous |scluster|ss.   There are lots
  660.                        <page down> for more CHKDSK
  661. of disk defragmenters on the market, and it's a very good idea to get one
  662. and use it weekly.
  663.  
  664. If you can't yet afford  to buy a disk defragmenter  (often called a disk
  665. |toptimizer|t) and you can't find a shareware one,  another solution to frag-
  666. mentation is to BACKUP the disk, FORMAT it, and RESTORE the files.   This
  667. is because any time  you backup or COPY a file  to a blank disk,  all the
  668. pieces of the file  are placed into  contiguous |scluster|ss.   Then when you
  669. format that first disk,  all the |scluster|ss become  available again so when
  670. you restore the files, they also stay in contiguous |scluster|ss.   It's only
  671. after you have deleted some file from the disk,  that a space opens up in
  672. the middle of the disk space so the next file that's written to the disk,
  673. if it's longer than the file that got deleted, may become fragmented.
  674.  
  675. In order to make  the |nCHKDSK|n command  tell you about fragmentation  on an
  676. entire disk,  you have to use  the command  on each directory separately.
  677. For example,  |nCHKDSK|n C:\*.* and |nCHKDSK|n C:\DOS\*.* and |nCHKDSK|n C:\UTIL\*.*,
  678. et cetera.
  679.  
  680.                        <page down> for more CHKDSK
  681. Please see the end of the Cache chapter for more important info about the
  682. |nCHKDSK|n command,  and also the FORMAT chapter  for information about  what
  683. |nCHKDSK|n means when it reports |sbad sector|ss.
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.                  <page down> for The |nCOMP|n and |nFC|n Commands
  701.                          The |TCOMP|T and |TFC|T Commands
  702.  
  703. These commands are used to COMPare two Files.  The syntax is simple:
  704.           |nCOMP|n D:\DIR\FILE1.EXT D:\DIR\FILE2.EXT
  705.           |nFC|n D:\DIR\FILE1.EXT D:\DIR\FILE2.EXT
  706. Where D: is the drive letter for each file,  and |nDIR|n is the directory for
  707. each file,  and FILE#.EXT are the names and extensions  of the files that
  708. you want to compare to each other.
  709.  
  710. The |nCOMP|n command compares each byte of the first file,  with each byte of
  711. the second file, in order,  and if there are ten mismatches,  the command
  712. will abort itself.   If there are less than ten differences, they will be
  713. displayed on the screen.  The format of the display is not very friendly,
  714. however.   It will say something like "Compare error at offset 3 File 1 =
  715. 44 File 2 = 64".   That means that the fourth byte of the first file is a
  716. capital D, and the fourth byte of the second file is a lowercase d.   Why
  717. does it mean that?   Well the offset means  how many bytes past the first
  718. one, so offset 3 = byte 4.   And the 44 and 64 are the hexadecimal values
  719. for the ASCII characters D and d.  If your version of DOS has the |nFC|n com-
  720.                      <page down> for more COMP and FC
  721. mand, you will usually want to use it instead of the |nCOMP|n command.   It's
  722. much more friendly.  But if you're in a hurry, |nCOMP|n is much faster.
  723.  
  724. If the files  have different byte sizes,  the |nCOMP|n command won't even try
  725. to compare them.
  726.  
  727. Some  computer manufacturers  that put out  their own  slightly different
  728. versions of DOS include a |nCOMP|n command that's slightly different than the
  729. way I've described it.   My description is for  regular PC-DOS  or MS-DOS
  730. so yours could be a bit different,  but it should have the same usage and
  731. syntax.
  732.  
  733. One way in which this command is really useful despite its unfriendliness
  734. is for copying really important files.   It is possible  (although rare!)
  735. for a computer to make a mistake, so you can just use the |nCOMP|n command on
  736. the source and target files, after a COPY command,  to be absolutely sure
  737. that the copy was made perfectly.  Any time you are tempted to use the /V
  738. switch  with the COPY command,  you're better off  leaving out the /V and
  739. using |nCOMP|n or |nFC|n after the copy is made, instead.  (See VERIFY.)
  740.                      <page down> for more COMP and FC
  741. If you're using a disk cache,  neither of these commands  will do you any
  742. good,  since what will actually get compared  is the destination copy and
  743. the copy in the cache, rather than the source copy on the disk.
  744.  
  745. You can use wildcards  with these commands, too.   If you want to compare
  746. every .BAT file on drive C:  with each file of the same name on drive A:,
  747. |nCOMP|n C:*.BAT A:\*.* will do it.   Since the second filename was specified
  748. with *.* the command will just look  for files with the same names as the
  749. files on the source side.
  750.  
  751. MS-DOS version 5 brings good news to the |nCOMP|n command.  It has some swit-
  752. ches that make it a lot friendlier.   The /D switch will display the dif-
  753. ferences in decimal ASCII code instead of in hex numbers.   The /A switch
  754. will actually show  the characters  instead of codes.   /L  will show the
  755. line number  of the mismatch  instead of  the byte offset.   And the /N=#
  756. switch will compare the first # lines of the files  even if the byte size
  757. of the files do not match.   Finally, the /C switch makes a non-case-sen-
  758. sitive comparison.   In other words,  D and d  will not be regarded  as a
  759. mismatch.
  760.                      <page down> for more COMP and FC
  761. The output of the |nFC|n command  is the last line that matches in both files
  762. right before some lines  that are different,  followed by the lines  that
  763. don't match, and finally the first line that matches again.   If there is
  764. another mismatch  between  the files,  then you'll see  the corresponding
  765. sequence of lines  for that difference,  and then the next difference  if
  766. there is another one, etc.  If there aren't any differences, |nFC|n will tell
  767. you that instead.
  768.  
  769. There are lots of switches with this command, that can make it do slight-
  770. ly different things.   /A /B /C /L /LB# /N /T /W and /#  are the possible
  771. switches.   The /B switch causes a binary comparison rather than an ASCII
  772. comparison,  and if you use the /B switch  then you don't want to use any
  773. of the other switches with it.   If you are comparing files that have the
  774. extension .BIN, .COM, .EXE, .LIB, .OBJ, or .SYS, then this is the default
  775. so you don't need to specify the switch.   A binary comparison means that
  776. the output will be displayed like 00000015: B8 0F.  That's the offset ad-
  777. dress of the mismatch  (that means how many bytes  past the first byte in
  778. the file)  and the hexadecimal codes for the byte in the first file,  and
  779. the hex code for the byte  in the second file that didn't match it.   The
  780.                      <page down> for more COMP and FC
  781. rest  of the switches  are for  ASCII comparisons,  which means the lines
  782. that don't match are displayed in normal text form.
  783.  
  784. The /A switch  gives an abbreviated output.   That means that if there is
  785. more than one line in a row that don't match  between the two files,  all
  786. the mismatched lines  won't be displayed.   Just  the last  matching line
  787. before the mismatch,  then a  ...  symbol to show that other lines exist,
  788. then the first matching line  after the mismatch.   Of course  if there's
  789. only one line that doesn't match,  that line will be displayed,  since it
  790. takes up as much room on your screen to show the line as it takes to show
  791. the ... line that just stands for other lines.
  792.  
  793. The /C switch  tells |nFC|n to ignore the case of the letters,  so that HELLO
  794. will not be regarded as a mismatch with hello.
  795.  
  796. /L  is the default  for ASCII files,  so it's only used  when you want to
  797. make an ASCII comparison on a file  that has the extension of .BIN, .COM,
  798. .EXE, .LIB, .OBJ, or .SYS.
  799.  
  800.                      <page down> for more COMP and FC
  801. The /LB# switch tells DOS how many lines  in a row are allowed to be dif-
  802. ferent,  without causing  the |nFC|n command to abort.   The default  is 100.
  803. The /N switch makes |nFC|n display the line number along with each line.  The
  804. /T switch  causes |nFC|n to not expand tabs to spaces.   The /W switch causes
  805. |nFC|n to treat  a bunch of consecutive spaces  like just one space.   The /#
  806. switch tells |nFC|n how many lines  after a mismatch  have to match before |nFC|n
  807. should consider that the files are matching again.   The default is 2.  I
  808. can't think  of any reason  why a body would really  want to worry  about
  809. that switch.  In fact most of the time you'll want to use no switches, or
  810. maybe the /C or /N switch.  You can pretty much ignore the rest.   Except
  811. if you want  to delete the |nCOMP|n command  because you like  |nFC|n better,  in
  812. that case you would be wanting to use the /B switch  whenever you're just
  813. verifying a COPY command,  because the /B will make it  work much faster,
  814. and since the target file should be identical to the source, you won't be
  815. needing the  nice friendly output  that you'd get  from not using  the /B
  816. switch,  because the only output you should be getting is "No differences
  817. encountered".
  818.  
  819.  
  820.                     <page down> for The |nDEBUG|n Command
  821.                             The |TDEBUG|T Command
  822.  
  823. The only thing I really have to say to a beginner about this command,  is
  824. leave it alone.   If you  don't know  how to use it,  then you don't know
  825. enough  about computers  to have any business  messing with it.   I don't
  826. mean to sound  harsh or anything  but this is a highly powerful  (meaning
  827. dangerous,  in the wrong hands)  command.   One slip of a finger  and you
  828. could easily trash  every speck of data  on your entire  hard disk.   You
  829. can even damage the hardware itself with this command, believe it or not!
  830. Don't use it unless you know what you're doing!
  831.  
  832. That doesn't mean  you should necessarily delete it  from your hard disk,
  833. however.   There are some things you can safely use it for.   PC Magazine
  834. and several other computer-related magazines  publish little scripts that
  835. you can  type up  and then use  |nDEBUG|n  to assemble them  into .COM files.
  836. This gives you a way  to get some  little utilities  such as CAPSLOCK.COM
  837. without buying or downloading anything.  You can sit right in your living
  838. room and create utilities that can perform all sorts of functions.  If it
  839. weren't for |nDEBUG|n,  you couldn't do that.   And it's really quite safe as
  840.                         <page down> for more DEBUG
  841. long as  you proofread each line you type in,  before you hit the <Enter>
  842. key, and just carefully follow the instructions in the magazine.
  843.  
  844. If you ever accidentally execute this command, you will get a |nprompt|n that
  845. just looks like this:
  846.           -
  847. That's it.   That's the |nDEBUG|n |nprompt|n.   Just type a Q (for Quit)  and hit
  848. the <Enter> key, and you'll be right back in DOS.
  849.  
  850. Anyway,  the main purpose  of this command  is to examine and modify data
  851. either in memory, or on disk.  It's called |nDEBUG|n because its main purpose
  852. is supposed to be  for finding the bugs  in programs that a programmer is
  853. in the process of writing.  But hardly anybody ever uses it for that.  In
  854. fact, hardly even any programmers use it for that.
  855.  
  856.  
  857.  
  858.  
  859.  
  860.             <page down> for The |nDISKCOPY|n and |nDISKCOMP|n Commands
  861.                     The |TDISKCOPY|T and |TDISKCOMP|T Commands
  862.  
  863. The |nDISKCOPY|n command will make  an exact duplicate of a floppy disk,  and
  864. |nDISKCOMP|n  will ensure  that it  worked perfectly.   |nDISKCOPY|n copies every
  865. single  byte  of data  on the disk,  including  bad sector marks  and the
  866. formatting codes.   For this reason  you don't have  to format the target
  867. disk first,  but you should anyway  because if you don't,  then you won't
  868. know whether  the disk has any |sbad sector|ss,  and you could end up copying
  869. good data to a bad sector.  If the target disk does have any |sbad sector|ss,
  870. you must not use it for a |nDISKCOPY|n purpose.   Because although the FORMAT
  871. command will mark out  the |sbad sector|ss,  the |nDISKCOPY|n command will ignore
  872. that, and copy the data to the target disk in the exact same way the data
  873. was sitting on the source disk.
  874.  
  875. If the target disk has been used before, it will be completely erased!
  876.  
  877. Another problem with this command is that it can only be used to copy one
  878. disk to another disk of the exact same size and capacity.  A whole lot of
  879. beginners get fooled  by that.   Since |nDISKCOPY|n makes  a |ssector|s-by-|ssector|s
  880.                 <page down> for more DISKCOPY and DISKCOMP
  881. mirror image  of the source disk,  the target disk  has to have the exact
  882. same number  of |ssector|ss  as the source disk.   You can't |nDISKCOPY|n  from a
  883. double-density  to a high-density  disk,  or from a 3.5"  disk to a 5.25"
  884. disk, or anything like that, or to or from a hard disk.
  885.  
  886. Now, some good points about this command:  For one, since it copies every
  887. byte on the source disk,  it copies any System and/or Hidden files, which
  888. are otherwise impossible to copy without changing those attributes first.
  889.  
  890. Second,  this command will copy files  from the source disk to the target
  891. disk in the same logical drives,  with the command  |nDISKCOPY|n A: A: or the
  892. |nDISKCOPY|n B: B: command.   So you can copy files between disks of the same
  893. size even if you have both sizes of floppy drives,  which is not possible
  894. with the COPY or XCOPY commands.  DOS will tell you when to switch disks,
  895. so you just need to be careful to remember which disk is which.   It is a
  896. good idea  to write-protect  the source disk,  so that even if you forget
  897. and put the source disk in when DOS asks for the target disk,  the source
  898. disk will not get ruined.
  899.  
  900.                 <page down> for more DISKCOPY and DISKCOMP
  901. Notice that |nDISKCOMP|n will say that two disks are totally different if the
  902. one is not a |nDISKCOPY|n  of the other.   Even  if they have  the exact same
  903. files on them.  Because for example, if the files on the source disk were
  904. fragmented,  and the COPY or XCOPY command was used to copy all the files
  905. to another disk, the target disk will be totally unfragmented.  And DISK-
  906. |nCOMP|n compares |ssector|s-by-|ssector|s, not file-by-file.  So the two disks won't
  907. compare at all,  even though each file on the target disk might be an ex-
  908. act duplicate of its twin on the source disk.
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.                     <page down> for The |nDOSKEY|n Command
  921.                             The |TDOSKEY|T Command
  922.  
  923. This command is new to DOS version 5.0 and you're going to love it!   You
  924. know the editing keys  that DOS  has always  used before?   Well they are
  925. helpful up to a point, but they're nothing compared to DOSKEY!
  926.  
  927. It's a TSR,  but it only takes 4.5K of RAM even if you enlarge its inter-
  928. nal buffer size to 1024 bytes,  and it's just about  the most useful 4.5K
  929. you ever spent!   Of course you can  LOADHIGH it  if you have  a 386 with
  930. some extended memory.
  931.  
  932. What does it do?   Well,  it's very much like 4DOS's command line editing
  933. and aliasing,  and it's very much like the third-party  History and Alias
  934. and CED utilities.   There are a lot  of little utilities  that have been
  935. written  over the years  to perform these functions,  but now DOS has its
  936. own, and since it comes with DOS it's guaranteed to work with DOS.
  937.  
  938. It remembers all the commands you've issued for a while,  and you can re-
  939. call them and edit and re-issue them, instead of just retyping some fifty
  940.                        <page down> for more DOSKEY
  941. character long command  that you just issued  five minutes ago.   You can
  942. use the <Home> and <End> keys,  <Insert> and <Delete> characters,  change
  943. whatever you want to change  in a previous command,  or just  re-enter it
  944. the way it was.
  945.  
  946. Another benefit of |nDOSKEY|n is that you can type more than one command on a
  947. line, and execute them all at once, instead of typing one, waiting for it
  948. to complete,  typing the next,  waiting, etc.,  whenever you know exactly
  949. what commands you're going to execute next.   For example,  if you have a
  950. large file that you want to move  from the C: drive to the B: drive,  in-
  951. stead of typing COPY C:FILE.EXT B:  and then waiting  for that to finish,
  952. then  typing  DEL C:FILE.EXT,  you can  instead  type  COPY C:FILE.EXT B:
  953. <Ctrl-T> IF EXIST B:FILE.EXT DEL C:FILE.EXT and hit <Enter>,  and it will
  954. be done automatically.   (The reason for the  IF EXIST command is in case
  955. the COPY  operation fails,  then the source file  won't get automatically
  956. deleted, but if the COPY is successful, then it will.)   Now whenever you
  957. type <Ctrl-T>  to separate  the commands  that you are typing  all on one
  958. command line, a  symbol will appear on the command line.  That's normal;
  959. that's what  it's supposed to do.   Of course with DOS  we've always been
  960.                        <page down> for more DOSKEY
  961. able to type the next command  while the last command is still executing,
  962. but only up to  fifteen characters.   On the sixteenth character the key-
  963. board buffer is full  and the computer  just beeps.   With |nDOSKEY|n you can
  964. enter successive commands up to 128 characters instead of only fifteen.
  965.  
  966. Well as soon as you execute  the |nDOSKEY|n command the first time after each
  967. reboot,  that loads it  into memory  and then it starts remembering every
  968. command that you enter.   When its |ninternal|n buffer gets full,  it forgets
  969. the oldest command  so that there is room  for the next command you type.
  970. It always remembers the most recent commands, however many can fit in the
  971. size of buffer you have chosen to use.
  972.  
  973. The <Up arrow> key  will show you the previous commands that you have en-
  974. tered, one at a time,  starting with the most recent one.   The <Down ar-
  975. row> key will show you the command  that you entered  right after you en-
  976. tered the one you're looking at.  Of course if you're looking at the last
  977. command you entered,  the <Down arrow> key will show your |ncurrent|n command
  978. line, which is blank.  Once you find a command that you would like to re-
  979. issue,  just hit the <Enter> key,  or edit it first  by using the <Home>,
  980.                        <page down> for more DOSKEY
  981. <End>, <Insert>, <Delete>, and <Arrow> keys and then hit <Enter>.
  982.  
  983. The <F7> key will show you all the commands that |nDOSKEY|n has stored in its
  984. buffer, in a numbered list.   To choose a command from the list, hit <F9>
  985. and |nDOSKEY|n will ask you which numbered command you want to execute.  Type
  986. its number and off you go!
  987.  
  988. My favorite  is the <F8> key.   If you want  to execute  the last command
  989. that started with "DI", but it was quite a while ago so you don't want to
  990. go looking for it with the <Up arrow> key,  just type DI and hit <F8> and
  991. it will show you the last command you entered  that started with "DI" and
  992. if that's not the right one, hit <F8> again and it will show you the last
  993. "DI" command before that.  When you find the one you want, hit <Enter>.
  994.  
  995. The <Page Up> key shows you the very oldest command that is still in DOS-
  996. KEY's buffer, and <Page Down> shows you the most recent command.
  997.  
  998. Now here are all the keys  that you can use to edit previous commands be-
  999. fore you re-enter them,  or to edit the command  you're presently typing.
  1000.                        <page down> for more DOSKEY
  1001. First of all,  the regular DOS editing keys we've always used  still work
  1002. for the |ncurrent|n command.  (They work a bit different though, than without
  1003. |nDOSKEY|n installed, especially if you use the /INSERT switch, so be careful
  1004. until you adjust.)  But |nDOSKEY|n adds all of the following:
  1005.  
  1006. The <Home> key takes the cursor to the leftmost character in the command.
  1007. <End> takes you  to the space after the rightmost character.   The <Left>
  1008. and <Right> arrows move the cursor one space  in the indicated direction.
  1009. <Ctrl-Left>  and <Ctrl-Right>  move the cursor one word  in the indicated
  1010. direction.
  1011.  
  1012. The <Backspace> key deletes the character to the left of the cursor.  The
  1013. <Delete>  key deletes  the character that  the cursor is on.   <Ctrl-End>
  1014. deletes the character that  the cursor is on,  as well as all the rest of
  1015. the characters to the end of the line.  <Ctrl-Home> deletes all the char-
  1016. acters to the left of the cursor, making the character that the cursor is
  1017. on become the first character of the command.
  1018.  
  1019. The <Insert> key  toggles insert mode on and off.   If insert mode is on,
  1020.                        <page down> for more DOSKEY
  1021. any character you type will cause the character the cursor is on, and all
  1022. the characters to the right of it,  to move to the right to make room for
  1023. the characters that you type.   If insert mode is off,  then whatever you
  1024. type will replace the character that the cursor is on.   If you have DOS-
  1025. KEY set up  so that insert mode  is the default,  then every time you hit
  1026. the <Enter> key to carry out a command,  it goes back to insert mode even
  1027. if you were in replace mode when you finished editing that command.   The
  1028. same thing goes  if your default  is replace mode;  hitting <Enter> takes
  1029. you back into your default mode  even if you had used the <Insert> key to
  1030. temporarily change modes.
  1031.  
  1032. The <Esc> key erases the entire line that you're working on.
  1033.  
  1034. You can even  use |nDOSKEY|n  to create an actual batch file on disk,  if you
  1035. want to execute  the batch file as you write it.   Just type the <Alt-F7>
  1036. keystroke combination,  which erases the |nDOSKEY|n buffer,  then execute the
  1037. commands that you want the batch file to contain, then type this:
  1038.           |nDOSKEY|n /HISTORY > NAME.BAT
  1039. where NAME.BAT  is the batch file  that you want  to create.   The |nDOSKEY|n
  1040.                        <page down> for more DOSKEY
  1041. /HISTORY switch displays a list of all the commands that are currently in
  1042. the buffer, and since you cleared the buffer before you started, "all the
  1043. commands" means just those commands  you wanted in the batch file.   Then
  1044. the > means that  DOS should use redirection  to send that list to a file
  1045. named NAME.BAT instead of sending it  to the screen as it normally would.
  1046. The /HISTORY switch can also be abbreviated as /H.
  1047.  
  1048. Not only that,  but you can also create what DOS calls "|smacros|s" with DOS-
  1049. KEY.  They're not really macros though.   That term generally means using
  1050. one keystroke in the place of a whole bunch of keystrokes.  But macros is
  1051. what DOS called these |nDOSKEY|n things, so we'll have to live with it.  DOS-
  1052. KEY's macros are really more like  batch files than anything else.   Just
  1053. really fast batch files though,  since macros are stored  as part of DOS-
  1054. KEY's |ninternal|n buffer  so they're always  in memory  and never need to be
  1055. read off the disk except the first time you create the macros during each
  1056. session.  Don't worry about the fact that the <Alt-F7> combination clears
  1057. DOSKEY's buffer.   It doesn't wipe out the macros, just the |nmemory|n of the
  1058. most recent commands you've entered at the command line.
  1059.  
  1060.                        <page down> for more DOSKEY
  1061. Another way  in which |nDOSKEY|n macros  are better than batch files  is that
  1062. the files in which they are stored on disk  don't take up any disk space.
  1063. I mean if you put the |nDOSKEY|n macro-creating commands in your AUTOEXEC.BAT
  1064. file,  that won't take up any more disk space  than the AUTOEXEC.BAT file
  1065. without macro commands did, unless you put in so many macro commands that
  1066. the AUTOEXEC.BAT file  gets larger than  one cluster in size,  because of
  1067. "|sslack space|s".   Any file, no matter how small,  takes up a whole cluster
  1068. of disk space,  so an AUTOEXEC.BAT with a bunch of |nDOSKEY|n macros  that is
  1069. 1987 bytes long,  doesn't take any more  disk space than  an AUTOEXEC.BAT
  1070. file with no |nDOSKEY|n macros that is 38 bytes long.  For example, you could
  1071. put fifteen |nDOSKEY|n macros in your AUTOEXEC.BAT file and delete fifteen of
  1072. the batch files you used to use,  and that would free up fifteen |scluster|ss
  1073. which is 30K of disk space on most hard drives.
  1074.  
  1075. There are  a few other ways  in which a |nDOSKEY|n macro  is different from a
  1076. batch file.   Since the macros  are stored  in memory instead of on disk,
  1077. you don't have to have access to a disk-based .BAT file in order to exec-
  1078. ute a macro.  It's just like the macro were an internal DOS command.
  1079.  
  1080.                        <page down> for more DOSKEY
  1081. A macro can only have  a total length of 127 characters because the whole
  1082. macro goes on one line and DOS commands  can only have 128 characters in-
  1083. cluding the carriage return (the <Enter> key),  whereas there is no limit
  1084. to the length of a batch file.
  1085.  
  1086. You can terminate a batch file by pressing <Ctrl-C> or <Ctrl-Break>,  but
  1087. pressing  one of those combinations  while a macro is executing will only
  1088. terminate the command that's running right now.   The next command in the
  1089. macro, and all the ones following it, will still get executed, just as if
  1090. you had used  <Ctrl-Break> in a batch file and answered "N" when it asked
  1091. "Terminate batch job?"
  1092.  
  1093. In |nDOSKEY|n macros you use $1 through $9 instead of the usual %1 through %9
  1094. for replaceable parameters.   You can also use  the replaceable parameter
  1095. $* in macros, and what it means is "all parts of the command tail togeth-
  1096. er",  even if it's more than nine parameters,  instead of just one "word"
  1097. at a time as $1 through $9 mean.   For example,  if you had a macro named
  1098. HELLO and you entered the command HELLO ABC DEF GHI at the prompt,  $1 is
  1099. ABC, $2 would be DEF, and $3 gets GHI.  But $* would be ABC DEF GHI.
  1100.                        <page down> for more DOSKEY
  1101. The redirection characters  that can be used  in |nDOSKEY|n macros  are quite
  1102. different from the normal ones.   $L (which stands for Less than) is used
  1103. in place of <,  $G (Greater than) for >,  $G$G for >>,  and $B (who knows
  1104. what that's supposed to stand for,  but it's the same symbol  that's used
  1105. for || in the PROMPT command, too) for ||.
  1106.  
  1107. You cannot use  the GOTO or SHIFT commands  or turn ECHO off  in a |nDOSKEY|n
  1108. macro,  or even use the @ symbol  to suppress  the display  of a command.
  1109. You cannot in any way  execute a second macro from  within one macro,  as
  1110. you can do using the CALL command for batch files.  You can't run a macro
  1111. from within a batch file either,  but that's not a big problem  since the
  1112. purpose of a macro  is to save keystrokes.   You don't need to  save key-
  1113. strokes inside a batch file, since you only need to create it once.
  1114.  
  1115. You can't access  an environment variable  from within a macro as you can
  1116. from within a batch file, with a construction such as %PATH%.
  1117.  
  1118. To create one of these |nDOSKEY|n macros, for example if you wanted to create
  1119. a macro that would clear the screen  and give you a  directory listing of
  1120.                        <page down> for more DOSKEY
  1121. the current directory with the /W and /P switches,  you'd just enter this
  1122. command:  |nDOSKEY|n MYDIR=CLS $T DIR /W /P and from that point on, until you
  1123. reboot the computer, every time you enter the command MYDIR, the commands
  1124. CLS and DIR /W /P will be executed for you.   Any macros that you want to
  1125. have active every time  you start your computer  should have their macro-
  1126. creating commands in your AUTOEXEC.BAT file.
  1127.  
  1128. To create a |nDOSKEY|n macro that uses replaceable parameters, it's done just
  1129. the same way as it's done in a batch file, but $1 through $9 are used in-
  1130. stead of %1 through %9.  For example,
  1131.           |nDOSKEY|n DIRTYPE=DIR $1 $T PAUSE $T TYPE $1 $B MORE
  1132. Now every time  you execute the command  DIRTYPE FILENAME,  the following
  1133. commands will be executed:
  1134.           DIR FILENAME
  1135.           PAUSE
  1136.           TYPE FILENAME || MORE
  1137. Because $1 means  the first "word" that's typed on the command line after
  1138. the name of the macro,  $T is what's used to separate  multiple commands,
  1139. and $B in macros is the || symbol.
  1140.                        <page down> for more DOSKEY
  1141. You can also  make a macro  that has the same name  as a regular DOS com-
  1142. mand.   For example,  if you had a macro that cleared the screen and then
  1143. did a DIR command,  you could  name it DIR  if you wanted to.   DOS would
  1144. execute the macro instead of  the internal DOS  DIR command  whenever you
  1145. enter DIR as a command.   But if you need to execute the regular DIR com-
  1146. mand instead of your macro,  you can just type a <Space>  between the DOS
  1147. prompt and the DIR command,  and that way DOS would not recognize it as a
  1148. macro,  but would recognize it as an internal command or executable file.
  1149.  
  1150. After you create  some |nDOSKEY|n macros and decide you want to use them per-
  1151. manently,  you can just type  |nDOSKEY|n /MACROS > NAME.BAT  to create a file
  1152. called NAME.BAT which will contain all the macros that you currently have
  1153. stored in memory.  But wait, it's not a batch file yet.  If you edit that
  1154. file and put the |nDOSKEY|n command and a <Space> in front of each line, then
  1155. you will have created  a batch file  that you can run  each time you boot
  1156. your computer, which will load all of those macros into memory.   This is
  1157. similar to the way you use  |nDOSKEY|n /HISTORY > NAME.BAT  to create a batch
  1158. file as described above,  but that makes  a file out of  all the commands
  1159. you have typed at the DOS prompt.   The /MACROS switch calls up a list of
  1160.                        <page down> for more DOSKEY
  1161. all the macros  you have created  since you last  |sreboot|sed your computer.
  1162. It can also be abbreviated as /M.
  1163.  
  1164. If your  |nDOSKEY|n |ninternal|n buffer  gets too full  to store any more macros,
  1165. you can delete one by setting it equal to nothing,  as in |nDOSKEY|n DIRTYPE=
  1166. but that won't give the buffer space  back to the part of the buffer that
  1167. stores every command you type.   It will only free it up for more macros.
  1168. You can delete  all the macros from  the |ncurrent|n |nDOSKEY|n buffer  by typing
  1169. the <Alt-F10> keystroke combination.
  1170.  
  1171. Since the dollar sign ($)  is used in |nDOSKEY|n macros to represent a lot of
  1172. different things,  if you want to use a dollar sign  that does not have a
  1173. special meaning to |nDOSKEY|n, you use a double dollar sign.  For example, if
  1174. you have a file  named FILE$  and you want to have a macro  that backs up
  1175. that file to a different disk, then when you enter the command which cre-
  1176. ates that macro,  the filename will  have to be  entered as FILE$$,  like
  1177. this:  |nDOSKEY|n BAK=COPY FILE$$ B:.  |nDOSKEY|n will see the double dollar sign
  1178. in that macro definition  and know that it's not  supposed to do anything
  1179. special with that  particular dollar sign,  even though most dollar signs
  1180.                        <page down> for more DOSKEY
  1181. are supposed to be interpreted in some way by the |nDOSKEY|n command.
  1182.  
  1183. When you first  load |nDOSKEY|n  into memory,  usually  in your  AUTOEXEC.BAT
  1184. file, if you want its |ninternal|n buffer to be anything other than 512 bytes
  1185. then you have to tell it so,  since 512 is the default.   You can set the
  1186. size anywhere from 256 bytes on up.  |nDOSKEY|n /BUFSIZE=#### will do it.
  1187.  
  1188. You can also  tell |nDOSKEY|n  whether you want it  to default to insert mode
  1189. or replace (overstrike) mode.   |nDOSKEY|n /INSERT or |nDOSKEY|n /OVERSTRIKE will
  1190. do that.   The default is overstrike  so you only need to use that if you
  1191. (or your AUTOEXEC.BAT file)  had previously used the command  |nDOSKEY|n /IN-
  1192. SERT since the last time you |sreboot|sed.
  1193.  
  1194. The |nDOSKEY|n command  also has a switch called /REINSTALL but I can't imag-
  1195. ine why anyone  would want to use it.   It loads  another copy  of |nDOSKEY|n
  1196. into memory, taking up extra memory.   It also clears the buffer, but you
  1197. can do that  with the <Alt-F7>  and <Alt-F10> combinations,  so why would
  1198. you want to load  a new copy of |nDOSKEY|n into |smemory|s?   I don't know.   But
  1199. if you want to, you can, by entering |nDOSKEY|n /REINSTALL.
  1200.                        <page down> for more DOSKEY
  1201. Well there was a lot of information in that section!  How about a review?
  1202.  
  1203. Entering more than one command at a time:
  1204.  
  1205. <Ctrl-T>      separates commands on the command line
  1206.  
  1207. Finding a command to edit:
  1208.  
  1209. <Up arrow>    displays previous command
  1210. <Down arrow>  displays next command
  1211. <Enter>       executes command
  1212. <F7>          numbered list of all commands in buffer
  1213. <F8>          type TEXT,  then it finds last command that began with TEXT
  1214. <F9>          executes a command from the numbered list displayed by <F7>
  1215. <Page Up>     earliest command in buffer
  1216. <Page Down>   most recent command
  1217.  
  1218. Editing commands:
  1219.  
  1220.                        <page down> for more DOSKEY
  1221. <Home>        moves cursor to first character of command
  1222. <End>         moves cursor to end of command
  1223. <Left arrow>  moves cursor to left
  1224. <Right arrow> moves cursor to right
  1225. <Ctrl-Left>   moves cursor to beginning of last word
  1226. <Ctrl-Right>  moves cursor to beginning of next word
  1227. <Backspace>   deletes character left of cursor
  1228. <Delete>      deletes character under cursor
  1229. <Ctrl-Home>   deletes all characters left of cursor
  1230. <Ctrl-End>    deletes all characters right of cursor
  1231. <Insert>      toggles between insert and replace (overstrike) modes
  1232. <Escape>      erases the |ncurrent|n command line
  1233.  
  1234. Naming macro with same name as a DOS command:
  1235.  
  1236. <Space>NAME   allows execution of command with same NAME as a macro
  1237.  
  1238. Erasing the |nDOSKEY|n buffer:
  1239.  
  1240.                        <page down> for more DOSKEY
  1241. <Alt-F7>      erases the command buffer
  1242. <Alt-F10>     erases the macro buffer
  1243.  
  1244. Writing macro definitions:
  1245.  
  1246. $1 -- $9      replaceable parameters; same as %1 -- %9 in batch files
  1247. $*            a replaceable parameter that means the entire command tail
  1248. $L            for redirection; the < symbol
  1249. $G            for redirection; the > symbol
  1250. $G$G          for redirection; the >> symbol
  1251. $B            for redirection; the || symbol
  1252. $T            to separate commands
  1253. $$            to represent a dollar sign inside a macro
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.                        <page down> for more DOSKEY
  1261. Switches for the |nDOSKEY|n command:
  1262.  
  1263. /BUFSIZE=#### size of |nDOSKEY|n buffer for commands and macros;  default 512
  1264. /HISTORY (/H) display of all commands in buffer
  1265. /INSERT       makes insert mode the default
  1266. /MACROS (/M)  display of all macros in buffer
  1267. /OVERSTRIKE   makes replace mode the default again if /INSERT was used
  1268. /REINSTALL    loads a new copy of |nDOSKEY|n into memory, clears buffer
  1269.  
  1270. Here is an excerpt  from my AUTOEXEC.BAT file  which shows all the |nDOSKEY|n
  1271. parts.   Notice that you must  load the |nDOSKEY|n TSR into memory before you
  1272. begin issuing any macro-making commands:
  1273.            C:\DOS\DOSKEY /BUFSIZE=1024 /INSERT
  1274.            C:\DOS\DOSKEY PCS=C:\PCT\PCSHELL
  1275.            C:\DOS\DOSKEY THES=CD C:\AW\THES $t THESAUR $t CD\
  1276.            C:\DOS\DOSKEY 4=CD C:\UTIL $t 4DOS $t CD\
  1277.            C:\DOS\DOSKEY HLP=C:\SIMPLY\HLPURSLF C:\SIMPLY\SIMPLY1
  1278.  
  1279.  
  1280.                    <page down> for The |nDOSSHELL|n Command
  1281.                            The |TDOSSHELL|T Command
  1282.  
  1283. The first thing I have to say  about the DOS Shell is that I'm sorry.   I
  1284. really am.   I just can't do this.   I wanted to work  with the Shell for
  1285. a while  and learn how to deal with it,  so that I could do a good job of
  1286. writing about it.   But I just can't do it.   I hate Shells.   I tried, I
  1287. really did.  But I can't.   Forgive me?   I'll tell you everything I know
  1288. about it, though.
  1289.  
  1290. First,  what is the DOS Shell?   Well it's a menu-driven mouse-supporting
  1291. interface that "protects" you from having to deal with DOS.  (Now you can
  1292. see why I hate it, because I love DOS and don't want to be protected from
  1293. it.)   It shows you a menu of things that you can do, and you use the ar-
  1294. row keys or the mouse to choose the thing you want to do,  and it does it
  1295. for you.   You don't have to know any DOS commands or anything to be able
  1296. to use it.   Of course you do have to know about DOS  in order to be able
  1297. to configure it to your personal taste,  and to add your own menu choices
  1298. to it and stuff.
  1299.  
  1300.                       <page down> for more DOSSHELL
  1301. When you enter  the |nDOSSHELL|n command,  after a minute,  you will  see the
  1302. Shell.   To get the menus,  just hit the <Alt> key  and the menu bar will
  1303. light up,  you just type the letter  that stands for the menu you want to
  1304. see.   Then you type the letter that's highlighted in the option you want
  1305. to choose from that menu.   Or you can use the <Left>  and <Right> arrows
  1306. to move to another menu,  or you can use  the <Esc> key to get out of the
  1307. menus altogether.  To get help, just hit the <F1> key.
  1308.  
  1309. The version 4 DOS Shell requires  that you use the APPEND command so that
  1310. the Shell will be able to find its companion files.   But the APPEND com-
  1311. mand is not a good thing to use.  Besides that, it's a TSR so it's really
  1312. a waste of memory.   There's a way to get around  the need for the APPEND
  1313. command though.  Just edit the |nDOSSHELL|n.BAT file, add the lines C|1: and CD
  1314. C:\DOS at the beginning, and |sCD|s\ at the end.  This will change to the DOS
  1315. directory before running the Shell,  so that all the companion files will
  1316. be in the current directory  and the Shell will be able to find them even
  1317. without the APPEND command, so take APPEND out of your AUTOEXEC.BAT file.
  1318.  
  1319. While the "shell" in |nDOSSHELL|n has nothing to do with the SHELL command or
  1320.                       <page down> for more DOSSHELL
  1321. any other computer-related meaning of the word "shell",  it is tied in to
  1322. the concept of Shelling Out in certain ways.  Go read that chapter if you
  1323. have ever had  a bunch of files named 10370F37 or anything like that,  or
  1324. if you've ever found  that you had  more than one copy  of COMMAND.COM in
  1325. memory at the same time and didn't know why, or if the Shell is taking up
  1326. too much memory for you to run your programs.
  1327.  
  1328. If you want to be able to print files from within the DOS Shell, you have
  1329. to first install the PRINT TSR from the command line.  (Not, and I repeat
  1330. not, from within the Shell.  Exit the Shell completely first.)  Just type
  1331. PRINT <Enter>, and it will ask you what port your printer is attached to.
  1332. If it's on LPT1 then hit <Enter> again, and otherwise tell it the correct
  1333. port and hit <Enter>.  When you go back into the Shell, your Print option
  1334. on the Files menu will work.  If you really want to be able to print from
  1335. within the Shell all the time, and you have the memory to spare, then you
  1336. can put PRINT /D:LPT1  (or PRINT /D:COM1  if your printer  is attached to
  1337. that port instead) into your AUTOEXEC.BAT.   Then the print option in the
  1338. Shell will be active  at all times.   Your screen will start displaying a
  1339. message about the print queue being empty every time you boot your compu-
  1340.                       <page down> for more DOSSHELL
  1341. ter, but that's ok,  that's what it's supposed to say because you haven't
  1342. told it yet what file you want to print.
  1343.  
  1344. Well that's about all I know  about the version 4 DOS Shell.   The one in
  1345. version 5,  on the other hand,  has some extra features over the old one.
  1346. Best of all, it's got a task switcher.
  1347.  
  1348. What's a task switcher?   Well,  you know how  if you're in the middle of
  1349. one application and you need to get some information out of another?  You
  1350. have to save  whatever you're working on  in the app you're in,  and exit
  1351. it,  and start up  the other app,  get the info you wanted from it,  exit
  1352. that one,  and start the first one back up,  and find the point where you
  1353. had left off.  Well, a task switcher allows you to have more than one app
  1354. open at a time,  and switch back  and forth between them.   The ones that
  1355. are in the background  aren't actually running.   They're just sort of in
  1356. limbo,  so it's not  like running  a multitasker.   But it's a lot easier
  1357. than exiting and starting and exiting a bunch of applications.
  1358.  
  1359. When you swap  from one application to another,  everything that's in RAM
  1360.                       <page down> for more DOSSHELL
  1361. is copied to your hard drive for storage, so that when you switch back to
  1362. that app,  whatever is now in memory  is copied to  a different swap file
  1363. and that first swap file  on the hard drive  is copied back  into RAM and
  1364. you're right where you left off  in that first app  before you swapped to
  1365. the second one, and the second one is sitting on the hard drive ready for
  1366. you to swap back into it.
  1367.  
  1368. All  you have to do  to be able to do  task switching  with version 5.0's
  1369. Shell,  is to pull down  the Options menu  and put your cursor on  Enable
  1370. Task Swapper  and hit the <Enter> key.   That should put a little diamond
  1371. on that line  right next to  the Enable Task Swapper option,  and now you
  1372. can start one program,  then hit <Ctrl-Esc> to get back to the DOS Shell,
  1373. and start another program, etc.
  1374.  
  1375. The task swapper uses  whatever directory is referenced by the TEMP vari-
  1376. able in your environment,  so if you have enough memory  to make a really
  1377. big  (at least one meg) RAMdisk,  and supposing that your |sRAMdisk|s's drive
  1378. letter is E:, then put SET |sTEMP|s=E:\ into your AUTOEXEC.BAT, then the task
  1379. swapper will put all its swap files there.   (Until the RAMdisk fills up,
  1380.                       <page down> for more DOSSHELL
  1381. that is.   If you have a whole bunch of applications active at once, then
  1382. the overflow will go into your C:\DOS directory.)   Two benefits of this:
  1383.  
  1384. First, a RAMdisk is about a million times faster than a hard drive.   And
  1385. second, the |nDOSSHELL|n and the task swapper are all the time creating these
  1386. little temporary files  and leaving them lay around in whatever directory
  1387. is listed in your TEMP variable.   Those files automatically  get deleted
  1388. whenever you exit  the application involved or the |nDOSSHELL|n itself.   But
  1389. sometimes your machine locks up and you have to reboot it,  so those temp
  1390. files don't get deleted.   Well if they're on the RAMdisk,  then the temp
  1391. files  don't just hang around waiting for you to find them and start won-
  1392. dering  where they came from,  because everything on a RAMdisk  is erased
  1393. when you reboot.  So those files are gone, out of your way.
  1394.  
  1395. The |nDOSSHELL|n is a really good candidate as a program that can be run from
  1396. a RAMdisk to speed it up.   To do so,  make sure the |sRAMdisk|s's  root dir-
  1397. ectory is the very first directory listed on your PATH,  and then put the
  1398. line  COPY C:\DOS\DOSS*.* E:\ into your  AUTOEXEC.BAT file  (that's again
  1399. assuming your RAMdisk is drive E:),  and that way, whenever you issue the
  1400.                       <page down> for more DOSSHELL
  1401. |nDOSSHELL|n command,  DOS will run the copy  that's on the  fast RAMdisk in-
  1402. stead of the copy of the program that's on the slow hard disk.   But, one
  1403. thing you want to remember if you do that,  is if you make any changes to
  1404. the DOSSHELL's configuration, you will need to COPY the |nDOSSHELL|n.INI file
  1405. from your RAMdisk  back to your C:\DOS directory  before you turn off the
  1406. computer.   Or else the changes you made  will be gone  the next time you
  1407. boot the computer.
  1408.  
  1409. If you have an EGA monitor  you will want to install |tEGA.SYS|t,  which is a
  1410. device driver that you use by putting a DEVIC|1E or DEVICEHIGH command into
  1411. your CONFIG.SYS file.   Otherwise,  every time you switch between one ap-
  1412. plication and another, it's likely that the screen will be all messed up.
  1413.  
  1414. Make absolutely sure that the Select Across Directories choice in the Op-
  1415. tions menu, is not enabled.   Use that option only when you need to,  and
  1416. remember to always turn it back off  as soon as you're done with whatever
  1417. you needed it for!   Otherwise,  whatever filename the cursor was sitting
  1418. on when you first entered the Shell,  will be one of the ones deleted, or
  1419. copied, or whatever,  when you do anything  that can affect more than one
  1420.                       <page down> for more DOSSHELL
  1421. file at a time.   Really terrible things can happen  to your files if you
  1422. leave Select Across Directories enabled!
  1423.  
  1424. With DOS 5.0's Shell, it's really easy to customize the colors exactly to
  1425. your own taste.  Just use the EDIT command to edit the |nDOSSHELL|n.INI file,
  1426. go near the end where you can see a bunch of colors written, pick out one
  1427. of the combinations that you're sure you will never want to use,  such as
  1428. hot pink, and change all its colors, save the file, and the next time you
  1429. go into |nDOSSHELL|n, choose the combination you edited, and it'll be the one
  1430. you created  instead of the one that used to exist under that name.   You
  1431. want  to be careful  how you  change it  though.   I mean  if you want to
  1432. change blue to green,  then change all  of the blues to green,  and don't
  1433. change anything else to green.  The same for any other color.  Because if
  1434. you  accidentally change,  say,  the foreground  of the menus  to red and
  1435. change  the background of the menus to red as well,  you won't be able to
  1436. read a word of the menus.
  1437.  
  1438. Speaking of colors,  if you use ANSI.SYS  and ESC sequences to change the
  1439. colors of your DOS screen,  the Shell will probably mess them up when you
  1440.                       <page down> for more DOSSHELL
  1441. exit back to DOS.  If the color choice includes a colored background your
  1442. screen will be black, and just the prompt itself will be your chosen col-
  1443. ors when you exit the Shell.   To fix that problem up,  you just need the
  1444. CLS command.   So if you use a DOSKEY macro like  DS=DOSSHELL $T CLS then
  1445. your screen will get cleared for you, to the proper colors, each time you
  1446. exit the Shell.   (I'm not sure why,  but it even works  when you haven't
  1447. actually exited the Shell,  like when you use the <Shift-F9>  or "Command
  1448. Prompt" options.)
  1449.  
  1450. If you run  a program from within the Shell,  that requires that you load
  1451. some TSR,  then run the program,  then unload the TSR, then when you exit
  1452. that program  you'll get a screen that says  something about "pop-up sup-
  1453. port" and tells you to  press <Ctrl-C> to continue.   That's ok,  because
  1454. it's supposed  to do that,  to make sure  that TSR that got loaded,  gets
  1455. properly removed from memory before going back to the Shell.
  1456.  
  1457. You mustn't ever  run commands such as CHKDSK with the /F switch,  or DEL
  1458. or ERASE or UNDELETE  or such things that affect  the information on your
  1459. disk while  you have another program running  in the task switcher!   Be-
  1460.                       <page down> for more DOSSHELL
  1461. cause you don't really have  any way of knowing for sure  what disk files
  1462. the other program  has open at the time.   Really awful things can happen
  1463. if you do those commands while another program is running.
  1464.  
  1465. Even CHKDSK  without the /F switch  will do funny things  if run from in-
  1466. side the |nDOSSHELL|n.   Because there are temp files open while the Shell is
  1467. in use, and CHKDSK will think that those are lost |scluster|ss.   If you exit
  1468. the Shell with <F3>, then run CHKDSK again,  it won't find any lost clus-
  1469. ters after all.  What a relief, right?  The MEM command also doesn't work
  1470. quite right from within the |nDOSSHELL|n.
  1471.  
  1472. You can make the Shell do anything you want it to do by adding a new item
  1473. to the menu.  To do that, you choose "New" from the Files menu while your
  1474. cursor is on the Main Group.   On the Properties window of the screen you
  1475. get when you do that, there's a space where you should enter the commands
  1476. you want the Shell to perform whenever you select this new menu item.  In
  1477. that space, you can enter just about any commands you want, including the
  1478. use of environment variables, just like you were writing a batch file ex-
  1479. cept you can't use the GOTO and SHIFT commands, and you separate commands
  1480.                       <page down> for more DOSSHELL
  1481. with  " ; "  (a semicolon surrounded by spaces) instead of a touch of the
  1482. <Enter> key.  And the @ symbol doesn't work in these "pseudo-batch files"
  1483. but that's ok because  ECHO is automatically off.   Be sure to notice the
  1484. Pause option on that Properties screen.   If there's an X next to it (the
  1485. |sdefault|s)  then when your  "pseudo |sbatch|s" commands are done,  you'll get a
  1486. "Press any key" message  before you go back to the Shell.   That's for in
  1487. case your command  displays something on the screen at the end,  that you
  1488. need to see.   If your command doesn't do that,  and you don't want it to
  1489. pause, hit the <Space> bar on that Pause option to remove the X.
  1490.  
  1491. If you  run your programs  by clicking on the executable filename  in the
  1492. Shell's directory  list window,  you'll always get  that  "Press any key"
  1493. message and the only thing you can do about it,  is create a menu item in
  1494. the Main Group window for that program and run it from there instead.
  1495.  
  1496. The DOS 5.0 Shell is not compatible with old mouse drivers.  If the Shell
  1497. gives you a message  about an incompatible mouse,  believe it.   A lot of
  1498. people choose  the "ignore" option there,  and end up having all sorts of
  1499. problems that don't seem to be related to the mouse, and they wonder why.
  1500.                       <page down> for more DOSSHELL
  1501. The Shell means it  when it says the mouse driver is incompatible.   Just
  1502. get a more recent version of mouse driver,  either from your local BBS or
  1503. from the mouse manufacturer  (it's almost always free of charge) and then
  1504. your Shell will work properly.
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.                      <page down> for The |nEDIT|n Command
  1521.                              The |TEDIT|T Command
  1522.  
  1523. This command is new with DOS 5.0, and if you hate EDLIN then you're going
  1524. to love this one!   It's a full screen ASCII text editor,  with pull-down
  1525. menus, mouse support, configurable colors, and on-line help.
  1526.  
  1527. You can't use this command if the |nQBASIC|n.EXE file is not in the same dir-
  1528. ectory with the |nEDIT|n.COM file, or else in a directory listed on your PATH
  1529. variable in the environment, or else in the current directory.
  1530.  
  1531. You can start  the EDITor  from within DOSSHELL,  or at the command line.
  1532. From the shell, it's in the Main Group.   From the prompt, just type |nEDIT|n
  1533. and the name of the file you want to edit.   For example, |nEDIT|n CONFIG.SYS
  1534. or |nEDIT|n C:\WORD\LETTER.DOC or if you want to create a new file, just |nEDIT|n
  1535. will do.
  1536.  
  1537. To pull down a menu from within the EDITor, all you have to do is hit one
  1538. of the <Alt> keys, and the menu bar will light up.   Choose the letter of
  1539. the menu you want to see,  and there it is.   Use the <Left>  and <Right>
  1540.                         <page down> for more EDIT
  1541. arrow keys to move to a different menu,  or use <Up>  and <Down>  to move
  1542. to a different selection.   Hit <Enter> to make a selection.   To go back
  1543. to editing without selecting a menu option, use <Esc>.
  1544.  
  1545. The |nEDIT|n command  depends on the code in the |nQBASIC|n.EXE file  for its op-
  1546. eration,  and since the PC-DOS QBASIC command depends on some code in the
  1547. ROM of a true IBM brand computer,  this means that PC-DOS's  |nEDIT|n command
  1548. won't work on anything but a true IBM computer.   So if you have a clone,
  1549. you'll have to have MS-DOS in order to use this command.
  1550.  
  1551. To get help,  just put  your cursor  on the menu item  for which you want
  1552. more information and press <F1>.   If you need help  in general about how
  1553. the EDITor works, when you first start it up,  don't give a filename, and
  1554. you will see a screen that offers you a Survival Guide.  Choose that.
  1555.  
  1556. Well, the chapter about the EDITor in the manual is so well done that be-
  1557. tween it and the online help,  you won't need anything else from me about
  1558. it.  Have fun!
  1559.  
  1560.                   <page down> for The |nEDLIN|n Line Editor
  1561.                           The |TEDLIN|T Line Editor
  1562.  
  1563. An awful lot of people  go around these days  saying that |nEDLIN|n is a lou-
  1564. sy rotten piece of junk.   Well, ok,  it's a pretty sad excuse for a text
  1565. editor,  but until you get  something better,  |nEDLIN|n will work just fine.
  1566. It's free with DOS,  after all.   And it's not a bit hard to learn,  like
  1567. everybody says it is.   (If you have DOS version 5, use EDIT instead, be-
  1568. cause it's even easier!)
  1569.  
  1570. It's called  a LINe EDitor  because it works with  one line of text  at a
  1571. time.   So it displays  files with  line numbers  next to each line,  and
  1572. these are the numbers you use to work with the lines.
  1573.  
  1574. The syntax of the command  is really simple.   You just type  the command
  1575. followed by the name of the file you want to edit or create.  If the file
  1576. is not in the current directory,  you specify the |spath|sname as well as the
  1577. filename.  For example,
  1578.           |nEDLIN|n C:\AUTOEXEC.BAT
  1579. If you enter  the |nEDLIN|n command with the /B switch,  as in |nEDLIN|n FILE /B,
  1580.                         <page down> for more EDLIN
  1581. you can edit all of a file that has  an End-of-File character embedded in
  1582. it.   (See the section  about the COPY command.)   Because the /B,  which
  1583. stands for Binary, means that |nEDLIN|n will look in the file's directory en-
  1584. try to see how long the file is,  rather than just editing whatever comes
  1585. before the first End-of-File character,  which would,  by the way, remove
  1586. all the text  that came after  that End-of-File character  if you were to
  1587. save the file back to disk  after not using the /B switch.   Also,  |nEDLIN|n
  1588. does put the EOF character on the end of every file you edit with it!
  1589.  
  1590. |nEDLIN|n is  especially good  for working with  AUTOEXEC.BAT  and CONFIG.SYS
  1591. files,  because |nEDLIN|n makes 100% ASCII files.   If you were to use a word
  1592. processor to create these configuration files, you would have to remember
  1593. to save the file in the word processor's version of text,  ASCII, or non-
  1594. document mode,  because word processors insert  all sorts of special sym-
  1595. bols  into the file,  to tell it  where the margins are,  where the words
  1596. should be  in boldfaced type,  things like that.   If you tried  to use a
  1597. file like that as a DOS file, DOS would just have a fit!   DOS only wants
  1598. to deal with plain old  straight ASCII text,  and that's  just what |nEDLIN|n
  1599. gives to DOS.
  1600.                         <page down> for more EDLIN
  1601. When you enter the above command, |nEDLIN|n AUTOEXEC.BAT, if the file already
  1602. exists you will see  "End of input file",  or if the file does not  exist
  1603. yet, you will see "New file".  Then you will see EDLIN's |nprompt|n, which is
  1604. just an asterisk (*).
  1605.  
  1606. Another use that |nEDLIN|n has for the asterisk  is to mark the |ncurrent|n line.
  1607. The  |ncurrent|n line  is the one  that was most recently  edited.   When you
  1608. first open a file,  the |ncurrent|n line is line one.   But after that,  most
  1609. commands  that you use  will change the |ncurrent|n line  to the one you per-
  1610. formed the command on.  So that line will be the one with the asterisk.
  1611.  
  1612. Now if you enter a command  without any line number,  the command will be
  1613. performed on the |ncurrent|n line.   Of course  it's always safest to include
  1614. the line number  in the command,  but leaving it out  and just  having it
  1615. default to the |ncurrent|n line is a convenient shortcut for after you become
  1616. really familiar with |nEDLIN|n.
  1617.  
  1618. A line in |nEDLIN|n  can be as long as  253 characters.   If the text you are
  1619. putting  on a line  reaches  the right edge  of the screen,  it will wrap
  1620.                         <page down> for more EDLIN
  1621. around to the next line of the screen,  but it is still  on the same line
  1622. number until you press <Enter> to end the line.
  1623.  
  1624. There are some special |tediting keys|t that you can use in |nEDLIN|n,  and these
  1625. same keys can be used  in the same way  at the DOS command line  as well.
  1626. The difference  is that in |nEDLIN|n,  these special keys  allow you to bring
  1627. down the previous line and make changes to it,  and in DOS these keys al-
  1628. low you to edit  and re-execute  the last command you entered.   You see,
  1629. there is a thing called a "template",  and in DOS,  the template is DOS's
  1630. |nmemory|n of the last command you executed.  In |nEDLIN|n, the template is DOS's
  1631. |nmemory|n of the last line that you edited, or if you're editing a line now,
  1632. then  the template  is the text  that was at that line number  before you
  1633. started changing it.  Well the |nediting keys|n let you work with whatever is
  1634. in the template.
  1635.  
  1636. For example,  the <F1> key will place the first character of the previous
  1637. line onto the |ncurrent|n line.  Then if you hit the <F1> key again, the sec-
  1638. ond character from the previous line  will be copied to the |ncurrent|n line.
  1639. The <F3> key  copies the entire  previous line,  from the position of the
  1640.                         <page down> for more EDLIN
  1641. cursor  to the end of the line,  to the |ncurrent|n line.   And the <F2> key,
  1642. followed by  some character,  copies all the characters from the previous
  1643. line, up until the character that you typed after the <F2> key.   For ex-
  1644. ample, suppose you are editing line number 4:
  1645.           4: Hello, there.  How are you doing?
  1646.           4:*_
  1647. Now if you were to hit the <F1> key five times, here's what you'd get:
  1648.           4: Hello, there.  How are you doing?
  1649.           4:*Hello_
  1650. Then if you hit the <F2> key immediately followed by the <w> key:
  1651.           4: Hello, there.  How are you doing?
  1652.           4:*Hello, there.  Ho_
  1653. And if you hit the <F3> key, you'd get this:
  1654.           4: Hello, there.  How are you doing?
  1655.           4:*Hello, there.  How are you doing?_
  1656. Now suppose you wanted  to change that line to  "How the heck are you do-
  1657. ing?"   First you'd hit  <F2> <a> to copy all of the line up to the first
  1658. "a" down to the |ncurrent|n line.   Then hit the  <Insert>  key to toggle the
  1659. insert mode on.   Now everything you type  will be inserted into the pre-
  1660.                         <page down> for more EDLIN
  1661. vious line.   So type "the heck ".   Then if you hit the  <F3>  key,  the
  1662. words "are you doing?" will be copied to the |ncurrent|n line.
  1663.  
  1664. Then,  suppose you decide  you don't want that  "the heck" in there after
  1665. all.  So edit line four again and hit <F2> <t> <F2> <t>:
  1666.           4: Hello, there.  How the heck are you doing?
  1667.           4:*Hello, there.  How _
  1668. Now what you want to do is delete the next 8 characters, right?   So just
  1669. hit the <Delete> key 8 times, and then <F3> and here's what you've got:
  1670.           4: Hello, there.  How the heck are you doing?
  1671.           4:*Hello, there.  How are you doing?_
  1672.  
  1673. Those same keys work the same way from one line number to the next.  Sup-
  1674. pose you want to write some lines that look like this:
  1675.           5: See page 428 for more information.
  1676.           6: See page 486 for more information._
  1677. Well, to do that,  you first write line number 5 like that, and then when
  1678. you get to line 6, just hit <F2> <2> and type <8> <6> and <F3>.
  1679.  
  1680.                         <page down> for more EDLIN
  1681. Now the <F4> key is also pretty interesting.  It does pretty much the ex-
  1682. act opposite of the <F2> key.   You type <F4> and some character key, and
  1683. all the characters up until that character you typed get deleted, and the
  1684. character you typed becomes the first character in the line, and the rest
  1685. of the line is copied to the |ncurrent|n line as well.  For example:
  1686.           4: Hello, there.  How the heck are you doing?
  1687.           4:*_
  1688. Now if you were to type <F1> <i> <F4> <,>, then you'd end up with this:
  1689.           4: Hello, there.  How the heck are you doing?
  1690.           4:*Hi, there.  How the heck are you doing?_
  1691.  
  1692. Ok,  we also have  the <F5> key.   What that does  is to copy the |ncurrent|n
  1693. line into the template without executing it.    Without the <F5> key, the
  1694. only way to edit the |ncurrent|n line  is to backspace over everything you've
  1695. already typed, change the little mistake, and then retype the rest of the
  1696. line again.  Yuk.  Well with <F5>, you can just put the line you're work-
  1697. ing on into the template,  and then use  the editing keys on it  as if it
  1698. were the previous line instead of the |ncurrent|n line.   The problem is, you
  1699. have to have a good |nmemory|n because as soon as you hit <F5>, the line dis-
  1700.                         <page down> for more EDLIN
  1701. appears from the screen.  You have to remember what it said to be able to
  1702. edit it without seeing it.  That's only the case at the DOS command line,
  1703. though.  In |nEDLIN|n, the line doesn't disappear when you hit <F5>.  Instead
  1704. a little @ symbol appears at the end, and the cursor moves down one line:
  1705.           4:*Hello, there.  How the hedk are you doing?@
  1706.              _
  1707. See where the  @ appeared when I hit <F5>?   Now that whole line,  except
  1708. for the @,  is in the template and the cursor dropped down so I could try
  1709. again, without the typo.  So if I hit <F2> <d> <c> <F3> then I have this:
  1710.           4:*Hello, there.  How the hedk are you doing?@
  1711.              Hello, there.  How the heck are you doing?_
  1712. Well that works the same way at the DOS command prompt,  except that once
  1713. you hit <F5>,  you can't see the line that you're editing like you can in
  1714. |nEDLIN|n.
  1715.  
  1716. Next,  there is the <F6> key.   This inserts a  ^Z  End-of-File character
  1717. into whatever you're typing.   The main use you'll ever have  for that is
  1718. when you're using  COPY CON FILENAME to create a little text file without
  1719. using |nEDLIN|n or anything.
  1720.                         <page down> for more EDLIN
  1721. Then there's the <F7> key,  which places a null character,  ASCII code 0,
  1722. into your text.  This will look like ^@ on the screen when you first type
  1723. it,  but in general the null character is just a blank.   It's useful for
  1724. causing the ECHO command to display a blank line during a batch file.
  1725.  
  1726. And last but not least, there's the <Esc> key, which will just cancel the
  1727. line you were typing and give you a blank line to start over on.
  1728.  
  1729. For the most part, you don't have to have anything to do with those edit-
  1730. ing keys if you don't want to.   |nEDLIN|n works perfectly well without them.
  1731. They're just there  to make life  easier for you,  but until  you get the
  1732. hang of them you don't have to use them at all.
  1733.  
  1734. Another special key combination that can be useful in |nEDLIN|n, is <Ctrl-V>.
  1735. What that does,  is to tell |nEDLIN|n that the next character you type should
  1736. be considered  to be a  control character.   For example,  if you were to
  1737. type <Ctrl-V> followed by the  [ character,  |nEDLIN|n would put  ^[ into the
  1738. file,  which represents  the ESCape character,  which is used  to get the
  1739. attention of the ANSI.SYS device driver, or of your printer.
  1740.                         <page down> for more EDLIN
  1741. Another type of special character that you can enter into a file with ED-
  1742. LIN, is box-drawing characters.   To enter an ASCII character number 206,
  1743. which looks like this,  ╬,  you just hold down the <Alt> key while typing
  1744. the numbers  2, 0, and 6 on the numeric keypad,  then let go of the <Alt>
  1745. key.   You can use these characters to make some decent-looking boxes and
  1746. menus.   For example, the top line of a double box:   ╔════════╦════════╗
  1747.  
  1748. Since everything you do in |nEDLIN|n  depends on the line numbers of the text
  1749. lines,  remember every time you change something,  use the L or P command
  1750. to display the file again, to see what the new line numbers are.  Because
  1751. whenever a line is inserted or deleted, that changes the line numbers for
  1752. all the lines  after that point in the file.   If you were to delete what
  1753. used to be  line number  27,  you'd be deleting  the wrong line,  because
  1754. since you inserted  some other line  before line 27,  now what used to be
  1755. line 27  is now line 28.   Always remember  to redisplay the line numbers
  1756. after making any changes, before making any more changes.
  1757.  
  1758. Ok, here are the most-often-used |nEDLIN|n commands:
  1759.  
  1760.                         <page down> for more EDLIN
  1761. To edit a line that already exists,  just enter its line number as a com-
  1762. mand.  |nEDLIN|n will show you the line as it presently exists, and right un-
  1763. der that, a blank line with the same line number, which is where you type
  1764. what you now want the line to say.   Hit <Enter> when you're done.   Then
  1765. if you also  want to edit  the very next line,  you can just hit  <Enter>
  1766. again; you don't have to type the next line number first.
  1767.  
  1768. C (copy)   To make another copy of some range of lines.  If you wanted to
  1769. put another copy  of lines 4 through 8 right before line 23,  the command
  1770. to do that would be 4,8,23C.
  1771.  
  1772. D (delete)   To delete a line or a range of lines.  If you want to delete
  1773. the line that has  number 6 beside it,  the command would be 6D.   If you
  1774. wanted to delete lines 6 through 12, the command would be 6,12D.
  1775.  
  1776. E (end)   This is the command you use  when you've got the file all done,
  1777. and you want to go back  to DOS.   |nEDLIN|n will make  a backup copy  of the
  1778. file the way it was  before you started editing,  and name that file with
  1779. the same name, only with a .BAK extension.  Then it will save the file to
  1780.                         <page down> for more EDLIN
  1781. disk under the name you called it when you started the |nEDLIN|n command.
  1782.  
  1783. I (insert)   This is the command you use  to insert any line into a file.
  1784. If you've just started creating a brand new file,  I is the first command
  1785. you want to use.   If you're editing a file that already exists,  and you
  1786. want to insert a line right before line number 6,  then the command would
  1787. be 6I.   If you want  to add a line  to the end of the file,  the command
  1788. would be #I  because the # symbol in |nEDLIN|n always means  "the line number
  1789. right after the last line number  that exists in the file".   To insert a
  1790. line right before the |ncurrent|n line, use .I, because the . symbol in |nEDLIN|n
  1791. means the |ncurrent|n line.   Or you could just use I because if no line num-
  1792. ber is specified,  |nEDLIN|n |sdefault|ss to the |ncurrent|n line.   When you're done
  1793. inserting lines,  you get out of insert mode  by using the <Enter> key to
  1794. make sure you're on a blank line,  then you use the <Ctrl-C> combination.
  1795. This will take you back to the  * |nprompt|n at the left edge  of the screen,
  1796. where you can use any of the other |nEDLIN|n commands to do some more editing
  1797. or to display the file, or whatever you want to do.
  1798.  
  1799. L (list)   This command is used to display the lines in the file.  If you
  1800.                         <page down> for more EDLIN
  1801. want to display lines 8 through 15,  the command would be 8,15L.   If you
  1802. leave out the ending line number,  and just type 8L, then |nEDLIN|n will dis-
  1803. play 23 lines starting with line 8.   What's different between the L com-
  1804. mand and the P command,  is that use of the L command does not change the
  1805. |ncurrent|n line number.  If line 9 was |ncurrent|n before you used the L command
  1806. then line 9 will still be |ncurrent|n afterward.
  1807.  
  1808. M (move)   This command  can be used  to move a line  or a block of lines
  1809. from one location to another in a file.   If you want to move the lines 3
  1810. through 16,  to a position just before line 1,  then the command would be
  1811. 3,16,1M.   If you only wanted to move line 3 to a position before line 1,
  1812. the command would be 3,3,1M.   In that case,  line 3 is both the starting
  1813. line and the ending line for the block of lines to be moved.
  1814.  
  1815. P (page)   This command displays 23 lines of the file.  If you use a line
  1816. number, as in 5P, then lines 5 through 27 will be displayed.   But if you
  1817. leave out the line number, the |ncurrent|n line and the next 22 lines will be
  1818. displayed.   When the P command is used,  the last line displayed becomes
  1819. the |ncurrent|n line.   Therefore, if you immediately give another P command,
  1820.                         <page down> for more EDLIN
  1821. without a line number, the next 23 lines will be displayed automatically.
  1822.  
  1823. Q (quit)   This is the command  to use to exit  from |nEDLIN|n without saving
  1824. the file.   If you've made a bunch of goofs, just enter Q and the copy of
  1825. the file on the disk  will remain exactly  as if you hadn't  edited it at
  1826. all.
  1827.  
  1828. R (replace)   This is  the  command  you  use to  search-and-replace  one
  1829. string of text with another.   Suppose you want  to change all of the oc-
  1830. currences  of the word  "Michael"  between lines  5 and 32  with the word
  1831. "Mike".  Here's the command:
  1832.           5,32 ? RMichael<F6>Mike
  1833. The ? in that command causes |nEDLIN|n to stop and ask you, on each line that
  1834. contains the word "Michael",  whether you really want  to replace it with
  1835. "Mike".   If you wanted to change  all the occurrences of Mike Jones with
  1836. Mike,  you could either use 5,32 ? RMike Jones<F6>Mike,  or you could use
  1837. 5,32 ? R Jones<F6>  which would replace  " Jones" with  "nothing at all".
  1838. Notice that  the only time  you include a <Space> in the search string or
  1839. replace string,  is when you want a  <Space>  to be one of the characters
  1840.                         <page down> for more EDLIN
  1841. that gets searched or replaced.  Otherwise, there must never be a <Space>
  1842. right after the R command.
  1843.  
  1844. Whenever you hit the <F6> key, you will see ^Z on your screen.   ^Z means
  1845. <Ctrl-Z> and <F6> is a shortcut for <Ctrl-Z>.   So if for some reason you
  1846. can't use  the <F6> key,  like if you have used  ANSI.SYS to reassign the
  1847. <F6> key to some other string, you can just use <Ctrl-Z> in its place.
  1848.  
  1849. S (search)   This command  will show  you every  line which  contains the
  1850. text you want to search for.  If you want to find every occurrence of the
  1851. word "Michael" from line 5 through line 32, the command would be:
  1852.           5,32 ? SMichael
  1853. The ? makes |nEDLIN|n ask you, after displaying each line, if you want to end
  1854. the search or not.   If you say Y(es),  the line becomes the |ncurrent|n line
  1855. and the search ends.   If you hit any key besides <Y>, the search contin-
  1856. ues.  If you don't use the ? parameter |nEDLIN|n will only show you the first
  1857. occurrence of that text that it finds.   Remember that the search is case
  1858. sensitive, so if you search for Michael, MICHAEL won't be found.
  1859.  
  1860.                         <page down> for more EDLIN
  1861. T (transfer)   This command  will import  another ASCII file into the one
  1862. you're currently editing.   This file has to be in the current directory,
  1863. though  it doesn't have to be  on the current drive.   And it really does
  1864. have to be a pure ASCII file.   Suppose you have a file named A:HELLO.TXT
  1865. and you want to insert it just before  line 6 of the file you're editing,
  1866.           6TA:HELLO.TXT
  1867. will do it.
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.                 For beginning of File 1, see What Is DOS?
  1881. |tAUTOEXEC.BAT|t|fSIMPLY1|f
  1882. |TCLS|T|fSIMPLY1|f
  1883. |TFAT|T|fSIMPLY1|f
  1884. |tUNDELETE|t|fSIMPLY1|f
  1885. |TWhat Is DOS?|T|fSIMPLY1|f
  1886. |tXCOPY|t|fSIMPLY1|f
  1887. |tBatch|t|fSIMPLY2|f
  1888. |TCALL|T|fSIMPLY2|f
  1889. |TECHO|T|fSIMPLY2|f
  1890. |TEXIST|T|fSIMPLY2|f
  1891. |TFIND|T|fSIMPLY2|f
  1892. |TGOTO|T|fSIMPLY2|f
  1893. |TIF|T|fSIMPLY2|f
  1894. |TMORE|T|fSIMPLY2|f
  1895. |TPAUSE|T|fSIMPLY2|f
  1896. |tRedirection|t|fSIMPLY2|f
  1897. |TSHIFT|T|fSIMPLY2|f
  1898. |TTEMP|T|fSIMPLY2|f
  1899. |T386|T|fSIMPLY3|f
  1900. |tBytes|t|fSIMPLY3|f
  1901. |tCache|t|fSIMPLY3|f
  1902. |tDEVICEHIGH|t|fSIMPLY3|f
  1903. |teXtended|t|fSIMPLY3|f
  1904. |tLOADHIGH|t|fSIMPLY3|f
  1905. |tMemory|t|fSIMPLY3|f
  1906. |TMEM|T|fSIMPLY3|f
  1907. |TPRINT|T|fSIMPLY3|f
  1908. |tqueue|t|fSIMPLY3|f
  1909. |tRAMdisk|t|fSIMPLY3|f
  1910. |TRAM|T|fSIMPLY3|f
  1911. |TRESTORE|T|fSIMPLY3|f
  1912. |TROM|T|fSIMPLY3|f
  1913. |TSUBST|T|fSIMPLY3|f
  1914. |tTSR|t|fSIMPLY3|f
  1915. |tANSI.SYS|t|fSIMPLY4|f
  1916. |tbad sector|t|fSIMPLY4|f
  1917. |tCONFIG.SYS|t|fSIMPLY4|f
  1918. |tDevice Driver|t|fSIMPLY4|f
  1919. |TDEVIC|1E|T|fSIMPLY4|f
  1920. |tEnvironment|t|fSIMPLY4|f
  1921. |tfloppy|t|fSIMPLY4|f
  1922. |TFORMAT|T|fSIMPLY4|f
  1923. |tIBMBIO.COM|t|fSIMPLY4|f
  1924. |tIBMDOS.COM|t|fSIMPLY4|f
  1925. |tIO.SYS|t|fSIMPLY4|f
  1926. |tLogical Drives|t|fSIMPLY4|f
  1927. |tmacros|t|fSIMPLY4|f
  1928. |tMSDOS.SYS|t|fSIMPLY4|f
  1929. |tPATH|t|fSIMPLY4|f
  1930. |tPROMPT|t|fSIMPLY4|f
  1931. |TSET|T|fSIMPLY4|f
  1932. |TSHELL|T|fSIMPLY4|f
  1933. |TC|1:|T|fSIMPLY5|f
  1934. |TCD|T|fSIMPLY5|f
  1935. |TCHDIR|T|fSIMPLY5|f
  1936. |TCOM1|T|fSIMPLY5|f
  1937. |tCOMMAND.COM|t|fSIMPLY5|f
  1938. |TCON|T|fSIMPLY5|f
  1939. |TCOPY|T|fSIMPLY5|f
  1940. |tcurrent|t|fSIMPLY5|f
  1941. |tdefault|t|fSIMPLY5|f
  1942. |TDEL|T|fSIMPLY5|f
  1943. |tDirectory|t|fSIMPLY5|f
  1944. |TDIR|T|fSIMPLY5|f
  1945. |TERASE|T|fSIMPLY5|f
  1946. |tExecutable|t|fSIMPLY5|f
  1947. |tinternal|t|fSIMPLY5|f
  1948. |TLPT1|T|fSIMPLY5|f
  1949. |TPRN|T|fSIMPLY5|f
  1950. |troot|t|fSIMPLY5|f
  1951. |tShelling Out|t|fSIMPLY5|f
  1952. |TTYPE|T|fSIMPLY5|f
  1953. |TVERIFY|T|fSIMPLY5|f
  1954. |t*.*|t|fSIMPLY6|f
  1955. |tASCII|t|fSIMPLY6|f
  1956. |TBBS|T|fSIMPLY6|f
  1957. |tbinary|t|fSIMPLY6|f
  1958. |tBoot|t|fSIMPLY6|f
  1959. |tcluster|t|fSIMPLY6|f
  1960. |tcommercial|t|fSIMPLY6|f
  1961. |tdecimal|t|fSIMPLY6|f
  1962. |tDisks|t|fSIMPLY6|f
  1963. |tdownloading|t|fSIMPLY6|f
  1964. |tfreeware|t|fSIMPLY6|f
  1965. |thexadecimal|t|fSIMPLY6|f
  1966. |tMagnetism|t|fSIMPLY6|f
  1967. |tParameters|t|fSIMPLY6|f
  1968. |tpublic domain|t|fSIMPLY6|f
  1969. |tReboot|t|fSIMPLY6|f
  1970. |tReplaceable|t|fSIMPLY6|f
  1971. |tsector|t|fSIMPLY6|f
  1972. |tShareware|t|fSIMPLY6|f
  1973. |tslack space|t|fSIMPLY6|f
  1974. |tWildcards|t|fSIMPLY6|f
  1975. |tWrite-protect|t|fSIMPLY6|f
  1976.